Skip to content

Commit

Permalink
Fix memory error in String::transform
Browse files Browse the repository at this point in the history
  • Loading branch information
evanphx committed Sep 23, 2011
1 parent 64029b8 commit a81d674
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vm/builtin/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ namespace rubinius {

if(out_p + len > out_end) {
native_int pos = out_p - output;
out_size += out_chunk;
out_size += (len > out_chunk ? len : out_chunk);
output = (uint8_t*)realloc(output, out_size);
out_p = output + pos;
out_end = output + out_size;
Expand Down

0 comments on commit a81d674

Please sign in to comment.