summaryrefslogtreecommitdiff
path: root/ext/digest/digest.c
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
commit0ac52b49f4999e2dc646a8b58783a7bef785ce1d (patch)
tree832e4c2f1b7c2c70b431ed18bc1eb9a1742c172d /ext/digest/digest.c
parent87025fdd4345f48821236ff19090976bfc11a2bd (diff)
* ext/digest/digest.c (rb_digest_base_alloc): need to initialize
buffer. [ruby-dev:21622] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest/digest.c')
-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 9bc9905..a575188 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);