cvs: gd(GD_2_0) /libgd CMakeLists.txt Makefile.am gd.h gd_gif_in.c strlcpy.c

From: Date: Mon, 26 Feb 2007 23:39:43 +0000
Subject: cvs: gd(GD_2_0) /libgd CMakeLists.txt Makefile.am gd.h gd_gif_in.c strlcpy.c
Groups: php.gd.cvs 
Request: Send a blank email to php-gd-cvs+get-129@lists.php.net to get a copy of this message
pajoye Mon Feb 26 23:39:43 2007 UTC Added files: (Branch: GD_2_0) /gd/libgd strlcpy.c Modified files: /gd/libgd CMakeLists.txt Makefile.am gd.h gd_gif_in.c Log: - #51, Use strlcpy instead of strncpy in gd_gif_c - fix off-by-one http://cvs.php.net/viewvc.cgi/gd/libgd/CMakeLists.txt?r1=1.1&r2=1.1.2.1&diff_format=u Index: gd/libgd/CMakeLists.txt diff -u gd/libgd/CMakeLists.txt:1.1 gd/libgd/CMakeLists.txt:1.1.2.1 --- gd/libgd/CMakeLists.txt:1.1 Tue Jan 23 23:54:15 2007 +++ gd/libgd/CMakeLists.txt Mon Feb 26 23:39:43 2007 @@ -140,6 +140,7 @@ jisx0208.h wbmp.c wbmp.h + strlcpy.c ) set(BUILD_SHARED_LIBS On) @@ -153,4 +154,4 @@ SET(GD_LIB gd) endif (USE_EXT_GD) -add_subdirectory(tests) \ No newline at end of file +add_subdirectory(tests) http://cvs.php.net/viewvc.cgi/gd/libgd/Makefile.am?r1=1.8.2.1&r2=1.8.2.2&diff_format=u Index: gd/libgd/Makefile.am diff -u gd/libgd/Makefile.am:1.8.2.1 gd/libgd/Makefile.am:1.8.2.2 --- gd/libgd/Makefile.am:1.8.2.1 Sat Feb 3 01:15:10 2007 +++ gd/libgd/Makefile.am Mon Feb 26 23:39:43 2007 @@ -17,7 +17,7 @@ lib_LTLIBRARIES = libgd.la -libgd_la_SOURCES = gd.c gdfx.c gd_security.c gd_gd.c gd_gd2.c gd_io.c gd_io_dp.c gd_gif_in.c gd_gif_out.c gd_io_file.c gd_io_ss.c gd_jpeg.c gd_png.c gd_ss.c gd_topal.c gd_wbmp.c gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c gdft.c gdhelpers.c gdhelpers.h gdkanji.c gdtables.c gdxpm.c jisx0208.h wbmp.c wbmp.h +libgd_la_SOURCES = gd.c gdfx.c gd_security.c gd_gd.c gd_gd2.c gd_io.c gd_io_dp.c gd_gif_in.c gd_gif_out.c gd_io_file.c gd_io_ss.c gd_jpeg.c gd_png.c gd_ss.c gd_topal.c gd_wbmp.c gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c gdft.c gdhelpers.c gdhelpers.h gdkanji.c gdtables.c gdxpm.c jisx0208.h wbmp.c wbmp.h strlcpy.c libgd_la_LDFLAGS = -version-info 2:0:0 $(XTRA_LDFLAGS) http://cvs.php.net/viewvc.cgi/gd/libgd/gd.h?r1=1.34.2.2&r2=1.34.2.3&diff_format=u Index: gd/libgd/gd.h diff -u gd/libgd/gd.h:1.34.2.2 gd/libgd/gd.h:1.34.2.3 --- gd/libgd/gd.h:1.34.2.2 Wed Feb 7 00:26:14 2007 +++ gd/libgd/gd.h Mon Feb 26 23:39:43 2007 @@ -791,6 +791,8 @@ /* resolution affects ttf font rendering, particularly hinting */ #define GD_RESOLUTION 96 /* pixels per inch */ +size_t gd_strlcpy(char *dst, const char *src, size_t siz); + #ifdef __cplusplus } #endif http://cvs.php.net/viewvc.cgi/gd/libgd/gd_gif_in.c?r1=1.5&r2=1.5.2.1&diff_format=u Index: gd/libgd/gd_gif_in.c diff -u gd/libgd/gd_gif_in.c:1.5 gd/libgd/gd_gif_in.c:1.5.2.1 --- gd/libgd/gd_gif_in.c:1.5 Thu Jan 11 20:58:04 2007 +++ gd/libgd/gd_gif_in.c Mon Feb 26 23:39:43 2007 @@ -126,9 +126,8 @@ if (strncmp((char *)buf,"GIF",3) != 0) { return 0; } - strncpy(version, (char *)buf + 3, 3); - version[3] = '\0'; + gd_strlcpy(version, (char *)buf + 3, sizeof(version)); if ((strcmp(version, "87a") != 0) && (strcmp(version, "89a") != 0)) { return 0; } http://cvs.php.net/viewvc.cgi/gd/libgd/strlcpy.c?view=markup&rev=1.1 Index: gd/libgd/strlcpy.c +++ gd/libgd/strlcpy.c

« previous php.gd.cvs (#129) next »