Commit a1471038bd7ce7d35108777a1e32ac1a0e99b5b9

David Turner 2001-10-18T11:23:51

fixing a "bug" that affected the Postscript hinter: growing a memory block though "realloc" didn't clear the new bytes of memory..

1
2
3
4
5
6
7
8
9
10
11
12
13
14
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index b4ec9b6..3707308 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -109,6 +109,9 @@
     if ( !Q )
       goto Fail;
 
+    if ( size > current )
+      memset( (char*)Q + current, 0, size - current );
+
     *P = Q;
     return FT_Err_Ok;