diff --git a/ChangeLog b/ChangeLog index ae1c98ce1..629242617 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-03-08 David Turner + + * 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 * include/freetype/config/ftstdlib.h (ft_strstr): New wrapper diff --git a/src/base/ftutil.c b/src/base/ftutil.c index e14aea79e..5f77be557 100644 --- 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 */