From 0ac52b49f4999e2dc646a8b58783a7bef785ce1d Mon Sep 17 00:00:00 2001 From: usa Date: Wed, 15 Oct 2003 04:19:48 +0000 Subject: * 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 --- ext/digest/digest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/digest') diff --git a/ext/digest/digest.c b/ext/digest/digest.c index 9bc9905d1f..a575188907 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); -- cgit v1.2.3