From f1d276113617068b3c54d9f452108a5e02a6b096 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 4 Sep 2007 23:02:36 +0000 Subject: [PATCH] Fix bug in clearing of new storage git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19917 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/t_array.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/util/t_array.pm b/src/util/t_array.pm index d4b217393..19b4c1863 100644 --- a/src/util/t_array.pm +++ b/src/util/t_array.pm @@ -41,6 +41,7 @@ __DATA__ #include #include #include +#include struct __header { size_t allocated; @@ -93,7 +94,7 @@ static inline int ptr = realloc(arr->elts, newsize); if (ptr == NULL) return -1; - memset((char *)arr->elts + oldsize, 0, newsize - oldsize); + memset((char *)ptr + oldsize, 0, newsize - oldsize); arr->elts = ptr; arr->allocated = newcount; return 0; -- 2.26.2