Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

random.c

  • Loading branch information...
commit 92d3e9d9915484797ec11e116d724d9b43bb9c99 1 parent 3240100
Steven Canfield authored lrz committed
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;
Please sign in to comment.
Something went wrong with that request. Please try again.