ref: 3a51afac36459daa2279a053cef4bf96f18b5d44
parent: d112cf099b378274da0552e180eb8c6cbd41ea89
author: David Turner <[email protected]>
date: Thu Mar 8 05:50:38 EST 2007
fixing implementation bug in ft_mem_strcpyn
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-08 David Turner <[email protected]>
+
+ * src/base/ftutil.c (ft_mem_strcpyn): fix a silly bug that prevented
+ the function to work properly, over-writing user-provided buffers in
+ some cases. Doh !
+
2007-03-05 Werner Lemberg <[email protected]>
* include/freetype/config/ftstdlib.h (ft_strstr): New wrapper
--- a/src/base/ftutil.c
+++ b/src/base/ftutil.c
@@ -209,7 +209,10 @@
FT_ULong size )
{
while ( size > 1 && *src != 0 )
+ {
*dst++ = *src++;
+ size--;
+ }
*dst = 0; /* always zero-terminate */