From: Ken Raeburn Date: Tue, 4 Sep 2007 23:02:36 +0000 (+0000) Subject: Fix bug in clearing of new storage X-Git-Tag: krb5-1.7-alpha1~890 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f1d276113617068b3c54d9f452108a5e02a6b096;p=krb5.git Fix bug in clearing of new storage git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19917 dc483132-0cff-0310-8789-dd5450dbe970 --- 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;