summaryrefslogtreecommitdiffstats
path: root/ext/digest
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-15 04:19:48 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-10-15 04:19:48 +0000
commitdf92d9c796abfe05ccb4f077754bf9f138cddd49 (patch)
tree832e4c2f1b7c2c70b431ed18bc1eb9a1742c172d /ext/digest
parentde860552ebd973fe15d2b26acc13072f84688dca (diff)
downloadruby-df92d9c796abfe05ccb4f077754bf9f138cddd49.tar.gz
ruby-df92d9c796abfe05ccb4f077754bf9f138cddd49.tar.xz
ruby-df92d9c796abfe05ccb4f077754bf9f138cddd49.zip
* ext/digest/digest.c (rb_digest_base_alloc): need to initialize
buffer. [ruby-dev:21622] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest')
-rw-r--r--ext/digest/digest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/digest/digest.c b/ext/digest/digest.c
index 9bc9905d1..a57518890 100644
--- a/ext/digest/digest.c
+++ b/ext/digest/digest.c
@@ -73,7 +73,7 @@ rb_digest_base_alloc(klass)
algo = get_digest_base_metadata(klass);
- pctx = xmalloc(algo->ctx_size);
+ pctx = xcalloc(algo->ctx_size, 1);
algo->init_func(pctx);
obj = Data_Wrap_Struct(klass, 0, free, pctx);