Skip to content

Commit

Permalink
Don't zero the full buffer in UnMarshaller::get_int().
Browse files Browse the repository at this point in the history
Instead, just make sure that the buffer is terminated at all.
  • Loading branch information
tilman2 committed Mar 21, 2009
1 parent 74000e7 commit 00a7292
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vm/marshal.cpp
Expand Up @@ -38,9 +38,9 @@ namespace rubinius {

Object* UnMarshaller::get_int() {
char data[1024];
std::memset(data, 0, 1024);

stream >> data;
data[sizeof(data) - 1] = '\0';

return Bignum::from_string(state, data, 10);
}
Expand Down

0 comments on commit 00a7292

Please sign in to comment.