Skip to content
Browse files

random.c

  • Loading branch information...
1 parent 3240100 commit 92d3e9d9915484797ec11e116d724d9b43bb9c99 Steven Canfield committed with Laurent Sansonetti Apr 20, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 random.c
View
1 random.c
@@ -563,6 +563,7 @@ random_bytes(VALUE obj, SEL sel, VALUE len)
}
rb_random_t *rnd = get_rnd(obj);
UInt8 *ptr = (UInt8 *)malloc(n);
+ assert(ptr != NULL);
unsigned int r = genrand_int32(&rnd->mt);
for (long i = 0; i < n; i++) {
ptr[i] = (char)r;

0 comments on commit 92d3e9d

Please sign in to comment.
Something went wrong with that request. Please try again.