diff -r -U 3 libpng-1.2.5/pngconf.h libpng-1.2.5patch02/pngconf.h --- libpng-1.2.5/pngconf.h Thu Oct 3 06:32:27 2002 +++ libpng-1.2.5patch02/pngconf.h Fri Jul 23 18:53:08 2004 @@ -1280,6 +1280,7 @@ # define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK)) # define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK)) # define png_strcpy _fstrcpy +# define png_strncpy _fstrncpy /* Added to v 1.2.6 */ # define png_strlen _fstrlen # define png_memcmp _fmemcmp /* SJT: added */ # define png_memcpy _fmemcpy @@ -1288,6 +1289,7 @@ # define CVT_PTR(ptr) (ptr) # define CVT_PTR_NOCHECK(ptr) (ptr) # define png_strcpy strcpy +# define png_strncpy strncpy /* Added to v 1.2.6 */ # define png_strlen strlen # define png_memcmp memcmp /* SJT: added */ # define png_memcpy memcpy diff -r -U 3 libpng-1.2.5/pngerror.c libpng-1.2.5patch02/pngerror.c --- libpng-1.2.5/pngerror.c Thu Oct 3 06:32:27 2002 +++ libpng-1.2.5patch02/pngerror.c Fri Jul 23 18:53:08 2004 @@ -137,7 +137,7 @@ { buffer[iout++] = ':'; buffer[iout++] = ' '; - png_memcpy(buffer+iout, error_message, 64); + png_strncpy(buffer+iout, error_message, 63); buffer[iout+63] = 0; } }