aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/digest/digest.c2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 45b5460f24..1df7f4154c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Oct 15 13:17:02 2003 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/digest/digest.c (rb_digest_base_alloc): need to initialize
+ buffer. [ruby-dev:21622]
+
Wed Oct 15 11:23:05 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
* marshal.c (w_object): dump extended modules as well.
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);