libxpm: Changes to 'upstream-unstable'
configure.ac |2 +- src/CrDatFrI.c | 34 +- src/RdFToBuf.c |4 src/WrFFrBuf.c |2 +- src/create.c | 11 ++- src/parse.c| 40 6 files changed, 69 insertions(+), 24 deletions(-) New commits: commit 1fab5e81fd761f628fb68d22934615536dbd0220 Author: Matthieu HerrbDate: Mon Dec 12 23:09:52 2016 +0100 libXpm 3.5.12 Signed-off-by: Matthieu Herrb diff --git a/configure.ac b/configure.ac index 46e2a27..2feb9ff 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libXpm], [3.5.11], +AC_INIT([libXpm], [3.5.12], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXpm]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) commit 8b3024e6871ce50b34bf2dff924774bd654703bc Author: Tobias Stoeckmann Date: Sun Dec 11 13:50:05 2016 +0100 Handle size_t in file/buffer length The values of file sizes and buffer sizes can exceed current limits. Therefore, use proper variable types for these operations. Signed-off-by: Matthieu Herrb Reviewed-by: Matthieu Herrb diff --git a/src/RdFToBuf.c b/src/RdFToBuf.c index 7f8ebee..69e3347 100644 --- a/src/RdFToBuf.c +++ b/src/RdFToBuf.c @@ -89,6 +89,10 @@ XpmReadFileToBuffer( return XpmOpenFailed; } len = stats.st_size; +if (len < 0 || len >= SIZE_MAX) { + close(fd); + return XpmOpenFailed; +} ptr = (char *) XpmMalloc(len + 1); if (!ptr) { fclose(fp); diff --git a/src/WrFFrBuf.c b/src/WrFFrBuf.c index b80aa62..0e57cc8 100644 --- a/src/WrFFrBuf.c +++ b/src/WrFFrBuf.c @@ -44,7 +44,7 @@ XpmWriteFileFromBuffer( const char *filename, char *buffer) { -int fcheck, len; +size_t fcheck, len; FILE *fp = fopen(filename, "w"); if (!fp) commit d1167418f0fd02a27f617ec5afd6db053afbe185 Author: Tobias Stoeckmann Date: Thu Dec 8 17:07:55 2016 +0100 Avoid OOB write when handling malicious XPM files. libXpm uses unsigned int to store sizes, which fits size_t on 32 bit systems, but leads to issues on 64 bit systems. On 64 bit systems, it is possible to overflow 32 bit integers while parsing XPM extensions in a file. At first, it looks like a rather unimportant detail, because nobody will seriously open a 4 GB file. But unfortunately XPM has support for gzip compression out of the box. An attacker can therefore craft a compressed file which is merely 4 MB in size, which makes an attack much for feasable. Signed-off-by: Matthieu Herrb Reviewed-by: Matthieu Herrb diff --git a/src/CrDatFrI.c b/src/CrDatFrI.c index 0dacf51..6735bfc 100644 --- a/src/CrDatFrI.c +++ b/src/CrDatFrI.c @@ -48,7 +48,7 @@ LFUNC(CreatePixels, void, (char **dataptr, unsigned int data_size, unsigned int height, unsigned int cpp, unsigned int *pixels, XpmColor *colors)); -LFUNC(CountExtensions, void, (XpmExtension *ext, unsigned int num, +LFUNC(CountExtensions, int, (XpmExtension *ext, unsigned int num, unsigned int *ext_size, unsigned int *ext_nlines)); @@ -122,8 +122,9 @@ XpmCreateDataFromXpmImage( /* compute the number of extensions lines and size */ if (extensions) - CountExtensions(info->extensions, info->nextensions, - _size, _nlines); + if (CountExtensions(info->extensions, info->nextensions, + _size, _nlines)) + return(XpmNoMemory); /* * alloc a temporary array of char pointer for the header section which @@ -187,7 +188,8 @@ XpmCreateDataFromXpmImage( if(offset <= image->width || offset <= image->cpp) RETURN(XpmNoMemory); -if( (image->height + ext_nlines) >= UINT_MAX / sizeof(char *)) +if (image->height > UINT_MAX - ext_nlines || + image->height + ext_nlines >= UINT_MAX / sizeof(char *)) RETURN(XpmNoMemory); data_size = (image->height + ext_nlines) * sizeof(char *); @@ -196,7 +198,8 @@ XpmCreateDataFromXpmImage( RETURN(XpmNoMemory); data_size += image->height * offset; -if( (header_size + ext_size) >= (UINT_MAX - data_size) ) +if (header_size > UINT_MAX - ext_size || + header_size + ext_size >= (UINT_MAX - data_size) ) RETURN(XpmNoMemory); data_size += header_size + ext_size; @@ -343,13 +346,14 @@ CreatePixels( *s = '\0'; } -static void +static int CountExtensions( XpmExtension *ext, unsigned intnum, unsigned int *ext_size, unsigned int *ext_nlines) { +size_t len; unsigned int x, y, a, size, nlines;
libxpm: Changes to 'upstream-unstable'
COPYRIGHT |4 - Makefile.am |2 NEWS.old| 16 +++--- configure.ac| 14 ++--- cxpm/Makefile.am| 17 -- cxpm/cxpm.c |4 - cxpm/cxpm.man | 49 --- doc/FAQ.html| 20 +++ doc/README.MSW | 20 +++ doc/README.html |4 - man/Makefile.am | 34 + man/cxpm.man| 49 +++ man/sxpm.man| 131 src/Attrib.c|2 src/CrBufFrI.c |2 src/RdFToBuf.c | 12 ++-- src/WrFFrI.c| 13 ++--- src/XpmI.h | 31 +--- src/amigax.c| 60 +++ src/create.c| 28 +-- src/data.c |6 +- src/hashtab.c |2 src/parse.c |7 +- src/rgb.c |2 src/scan.c | 30 +-- src/simx.c | 18 +++ sxpm/Makefile.am| 19 --- sxpm/plaid.xpm | 42 sxpm/plaid_ext.xpm | 42 sxpm/plaid_mask.xpm | 42 sxpm/sxpm.c | 16 +++--- sxpm/sxpm.man | 131 32 files changed, 437 insertions(+), 432 deletions(-) New commits: commit acaaea96776b36c097d5413040c5ce85d3ae6cb9 Author: Alan Coopersmith alan.coopersm...@oracle.com Date: Wed Mar 7 20:39:55 2012 -0800 libXpm 3.5.10 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com diff --git a/configure.ac b/configure.ac index 00a4c8f..ba7e3b4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) -AC_INIT([libXpm], [3.5.9], +AC_INIT([libXpm], [3.5.10], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXpm]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) commit 1450186652cb9d2efe55c8da7cb64996eddd34c7 Author: Alan Coopersmith alan.coopersm...@oracle.com Date: Fri Nov 18 23:25:16 2011 -0800 closeness_cmp: maintain constness when casting pointers create.c: In function 'closeness_cmp': create.c:224:5: warning: cast discards qualifiers from pointer target type create.c:224:5: warning: cast discards qualifiers from pointer target type Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com diff --git a/src/create.c b/src/create.c index dc09370..98678d8 100644 --- a/src/create.c +++ b/src/create.c @@ -221,7 +221,7 @@ typedef struct { static int closeness_cmp(const void *a, const void *b) { -CloseColor *x = (CloseColor *) a, *y = (CloseColor *) b; +const CloseColor *x = (const CloseColor *) a, *y = (const CloseColor *) b; /* cast to int as qsort requires */ return (int) (x-closeness - y-closeness); commit 7aa7b34491de534da56d637552ee86f94f038cc3 Author: Alan Coopersmith alan.coopersm...@oracle.com Date: Fri Nov 18 23:22:12 2011 -0800 sxpm: make ErrorMessage take const char * arg to fix -Wwrite-strings warnings Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com diff --git a/sxpm/sxpm.c b/sxpm/sxpm.c index 9585abe..a5eaa32 100644 --- a/sxpm/sxpm.c +++ b/sxpm/sxpm.c @@ -110,7 +110,7 @@ static char *plaid[] = { static Colormap colormap; void Usage(void); -void ErrorMessage(int ErrorStatus, char *tag); +void ErrorMessage(int ErrorStatus, const char *tag); void Punt(int i); void VersionInfo(void); void kinput(Widget widget, char *tag, XEvent *xe, Boolean *b); @@ -615,7 +615,7 @@ if no input is specified sxpm reads from standard input.\n\ void ErrorMessage( int ErrorStatus, -char *tag) +const char *tag) { char *error = NULL; char *warning = NULL; commit 4cedf181bcfe13e5d206554c51edb82cb17e7ad5 Author: Jeremy Huddleston jerem...@apple.com Date: Fri Nov 11 10:17:11 2011 -0800 Include missing headers This fixes implicit declarations for strdup and strcasecmp. Signed-off-by: Jeremy Huddleston jerem...@apple.com diff --git a/src/XpmI.h b/src/XpmI.h index 280525d..122aea5 100644 --- a/src/XpmI.h +++ b/src/XpmI.h @@ -312,6 +312,7 @@ FUNC(xpmstrdup, char *, (char *s1)); #else #undef xpmstrdup #define xpmstrdup strdup +#include string.h #endif #ifdef NEED_STRCASECMP @@ -319,6 +320,7 @@ FUNC(xpmstrcasecmp, int, (char *s1, char *s2)); #else #undef xpmstrcasecmp #define xpmstrcasecmp strcasecmp +#include strings.h #endif FUNC(xpmatoui, unsigned int, commit 933b5d1f1fe9273d1a984707687b36ec61c4c5af Author: Alan Coopersmith alan.coopersm...@oracle.com Date: Thu Nov 10 21:32:15 2011 -0800 Fix gcc -Wwrite-strings warnings that don't require public API changes Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com diff --git a/src/WrFFrI.c b/src/WrFFrI.c index 83c11fa..b592fa1 100644 --- a/src/WrFFrI.c +++ b/src/WrFFrI.c @@ -51,7 +51,7 @@ #endif /* MS Windows define a function called WriteFile
libxpm: Changes to 'upstream-unstable'
.gitignore | 76 +++- CHANGES | 957 COPYING | 101 +++-- FAQ.html| 344 -- FILES | 68 --- INSTALL | 229 Makefile.am | 30 - NEWS| 957 README.AMIGA| 10 README.MSW | 127 -- README.html | 303 acinclude.m4| 46 -- configure.ac| 63 +-- cxpm/.gitignore |3 cxpm/Makefile.am| 20 - cxpm/cxpm.c |1 dev/null|binary doc/FAQ.html| 344 ++ doc/Makefile.am |6 doc/README.AMIGA| 10 doc/README.MSW | 127 ++ doc/README.html | 303 doc/xpm.PS.gz |binary include/Makefile.am |1 include/X11/xpm.h |1 m4/ax_define_dir.m4 | 49 ++ src/CrBufFrI.c |2 src/CrDatFrI.c |1 src/Makefile.am |5 src/RdFToI.c|1 src/WrFFrI.c|1 src/XpmI.h |1 src/create.c|2 src/data.c |1 src/parse.c |3 src/scan.c |1 sxpm/.gitignore |3 sxpm/Makefile.am| 25 - sxpm/sxpm.c |1 sxpm/sxpm.man |1 40 files changed, 1984 insertions(+), 2240 deletions(-) New commits: commit 22a434d061af224536baee6c6110b603c5c96b2c Author: Alan Coopersmith alan.coopersm...@oracle.com Date: Fri Oct 29 17:29:25 2010 -0700 libXpm 3.5.9 Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com diff --git a/configure.ac b/configure.ac index 8fc2caa..057c056 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([libXpm], -[3.5.8], +[3.5.9], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXpm]) AC_CONFIG_SRCDIR([Makefile.am]) commit c11f1bd18303139f070e1873382632ee80cd9878 Author: Gaetan Nadon mems...@videotron.ca Date: Wed Oct 20 08:30:56 2010 -0400 config: remove obsolete FILES file from the Imakefile days It lists the files contained in the original BULL Research Koala Project. Signed-off-by: Gaetan Nadon mems...@videotron.ca diff --git a/FILES b/FILES deleted file mode 100644 index e1bf3fa..000 --- a/FILES +++ /dev/null @@ -1,68 +0,0 @@ -CHANGES -COPYRIGHT -FAQ.html -FILES -Imakefile -Makefile.noX -README.html -README.AMIGA -README.MSW -namecvt -lib -lib/Imakefile -lib/Makefile.noX -lib/Makefile.AmigaGCC -lib/Smakefile -lib/Attrib.c -lib/CrBufFrI.c -lib/CrBufFrP.c -lib/CrDatFrI.c -lib/CrDatFrP.c -lib/CrIFrBuf.c -lib/CrIFrDat.c -lib/CrIFrP.c -lib/CrPFrBuf.c -lib/CrPFrDat.c -lib/CrPFrI.c -lib/Image.c -lib/Info.c -lib/RdFToBuf.c -lib/RdFToDat.c -lib/RdFToI.c -lib/RdFToP.c -lib/WrFFrBuf.c -lib/WrFFrDat.c -lib/WrFFrI.c -lib/WrFFrP.c -lib/amigax.h -lib/amigax.c -lib/create.c -lib/data.c -lib/descrip.mms -lib/hashtab.c -lib/make.com -lib/misc.c -lib/parse.c -lib/rgb.c -lib/rgbtab.h -lib/scan.c -lib/simx.h -lib/simx.c -lib/xpm.h -lib/XpmI.h -lib/Xpm-def.cpp -doc -doc/xpm.PS -sxpm -sxpm/Imakefile -sxpm/Makefile.noX -sxpm/plaid.xpm -sxpm/plaid_ext.xpm -sxpm/plaid_mask.xpm -sxpm/sxpm.c -sxpm/sxpm.man -cxpm -cxpm/Imakefile -cxpm/Makefile.noX -cxpm/cxpm.c -cxpm/cxpm.man diff --git a/Makefile.am b/Makefile.am index 08f6072..a289a24 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,7 +8,7 @@ ACLOCAL_AMFLAGS = -I m4 pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = xpm.pc -EXTRA_DIST = COPYRIGHT FILES NEWS.old +EXTRA_DIST = COPYRIGHT NEWS.old MAINTAINERCLEANFILES = ChangeLog INSTALL commit 0ea6c432a068fc4edf90c614e68a4f4be94edd14 Author: Gaetan Nadon mems...@videotron.ca Date: Sun Oct 17 12:51:15 2010 -0400 doc: move doc files to the newly created doc dir. As per guidelines for all xorg modules. Signed-off-by: Gaetan Nadon mems...@videotron.ca diff --git a/CHANGES b/CHANGES deleted file mode 100644 index b90e6cd..000 --- a/CHANGES +++ /dev/null @@ -1,957 +0,0 @@ -/* - * Copyright (C) 1989-95 GROUPE BULL - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the Software), to - * deal in the Software without restriction, including without limitation the - * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or - * sell copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND
libxpm: Changes to 'upstream-unstable'
.gitignore | 12 + ChangeLog| 101 - Makefile.am | 10 + README | 25 +++ acinclude.m4 | 47 +++--- configure.ac | 27 +-- cxpm/.gitignore |5 cxpm/Makefile.am |8 - cxpm/cxpm.c | 15 - src/.gitignore |6 src/Attrib.c | 42 ++--- src/CrBufFrI.c | 73 - src/CrBufFrP.c | 13 - src/CrDatFrI.c | 72 - src/CrDatFrP.c | 12 - src/CrIFrBuf.c | 27 +-- src/CrIFrDat.c | 27 +-- src/CrIFrP.c | 12 - src/CrPFrBuf.c | 15 - src/CrPFrDat.c | 15 - src/CrPFrI.c | 10 - src/Image.c |6 src/Info.c | 18 +- src/Makefile.am |2 src/RdFToBuf.c |6 src/RdFToDat.c |6 src/RdFToI.c | 45 +++-- src/RdFToP.c | 15 - src/WrFFrBuf.c |6 src/WrFFrDat.c |6 src/WrFFrI.c | 69 - src/WrFFrP.c | 12 - src/create.c | 417 ++- src/data.c | 34 ++-- src/hashtab.c| 29 +-- src/misc.c | 19 +- src/parse.c | 62 src/rgb.c| 58 +++ src/scan.c | 134 - sxpm/.gitignore |5 sxpm/Makefile.am |8 - sxpm/sxpm.c | 55 +++ 42 files changed, 733 insertions(+), 853 deletions(-) New commits: commit 130b2fb0ea716143c63ba30856eecb351bc2af2a Author: Alan Coopersmith alan.coopersm...@sun.com Date: Fri Oct 9 10:32:08 2009 -0700 libXpm 3.5.8 Signed-off-by: Alan Coopersmith alan.coopersm...@sun.com diff --git a/configure.ac b/configure.ac index 5926178..a490a1d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.57) -AC_INIT([libXpm], 3.5.7, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXpm) +AC_INIT([libXpm], 3.5.8, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXpm) AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2]) commit a195bd6d375c311b9bf6d7cce477f1d131425757 Author: Alan Coopersmith alan.coopersm...@sun.com Date: Thu Oct 8 21:29:45 2009 -0700 Migrate to xorg macros 1.3 XORG_DEFAULT_OPTIONS Signed-off-by: Alan Coopersmith alan.coopersm...@sun.com diff --git a/configure.ac b/configure.ac index ae0f78b..5926178 100644 --- a/configure.ac +++ b/configure.ac @@ -6,19 +6,21 @@ AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE # Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG -m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.2) +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) + AM_CONFIG_HEADER([config.h]) # Checks for programs. AC_PROG_LIBTOOL AC_PROG_CC LT_AC_PROG_SED -XORG_CWARNFLAGS + +XORG_DEFAULT_OPTIONS # Checks for pkg-config packages PKG_CHECK_MODULES(XPM, xproto x11) -XPM_CFLAGS=$CWARNFLAGS $XPM_CFLAGS AC_SUBST(XPM_CFLAGS) AC_SUBST(XPM_LIBS) @@ -59,13 +61,8 @@ if test x$STAT_ZFILE = xyes ; then fi PKG_CHECK_MODULES(SXPM, xt xext xextproto, build_sxpm=true, build_sxpm=false) -SXPM_CFLAGS=$CWARNFLAGS $SXPM_CFLAGS AM_CONDITIONAL(BUILD_SXPM, test x$build_sxpm = xtrue) -XORG_MANPAGE_SECTIONS -XORG_RELEASE_VERSION -XORG_CHANGELOG - AC_OUTPUT([Makefile src/Makefile sxpm/Makefile diff --git a/cxpm/Makefile.am b/cxpm/Makefile.am index 3aecc8c..42cd49d 100644 --- a/cxpm/Makefile.am +++ b/cxpm/Makefile.am @@ -1,7 +1,7 @@ bin_PROGRAMS = cxpm AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/include/X11 -AM_CFLAGS = $(XPM_CFLAGS) +AM_CFLAGS = $(CWARNFLAGS) $(XPM_CFLAGS) cxpm_SOURCES = cxpm.c @@ -34,13 +34,13 @@ MAN_SUBSTS = \ SUFFIXES = .$(APP_MAN_SUFFIX) .man .man.$(APP_MAN_SUFFIX): - sed $(MAN_SUBSTS) $ $@ + $(AM_V_GEN)sed $(MAN_SUBSTS) $ $@ if USE_GETTEXT noinst_DATA = cxpm.po cxpm.po: $(cxpm_SOURCES:%=$(srcdir)/%) - xgettext -cL10N_Comments -d cxpm -n $(cxpm_SOURCES:%=$(srcdir)/%) + $(AM_V_GEN)xgettext -cL10N_Comments -d cxpm -n $(cxpm_SOURCES:%=$(srcdir)/%) CLEANFILES += cxpm.po endif diff --git a/src/Makefile.am b/src/Makefile.am index 5dcdf03..0c8652a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,7 @@ lib_LTLIBRARIES=libXpm.la AM_CPPFLAGS = -I. -I$(top_srcdir)/include/X11/ -AM_CFLAGS = $(XPM_CFLAGS) +AM_CFLAGS = $(CWARNFLAGS) $(XPM_CFLAGS) libXpm_la_LDFLAGS = -version-number 4:11:0 -no-undefined libXpm_la_LIBADD = $(XPM_LIBS) diff --git a/sxpm/Makefile.am b/sxpm/Makefile.am index 65388f8..faa192c 100644 --- a/sxpm/Makefile.am +++ b/sxpm/Makefile.am @@ -2,7 +2,7 @@ if BUILD_SXPM bin_PROGRAMS = sxpm -AM_CFLAGS = $(SXPM_CFLAGS) +AM_CFLAGS = $(CWARNFLAGS) $(SXPM_CFLAGS) AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include @@ -38,13 +38,13 @@ MAN_SUBSTS = \ SUFFIXES = .$(APP_MAN_SUFFIX) .man .man.$(APP_MAN_SUFFIX): -
libxpm: Changes to 'upstream-unstable'
acinclude.m4 | 47 + configure.ac | 22 +++ cxpm/Makefile.am | 11 +++ cxpm/cxpm.c | 50 --- src/Makefile.am |5 +-- src/RdFToI.c |4 ++ src/WrFFrI.c | 15 +- src/XpmI.h |4 ++ src/data.c |2 - src/parse.c |2 - src/simx.h | 17 +++- sxpm/Makefile.am | 12 +++- sxpm/sxpm.c | 77 +++ 13 files changed, 225 insertions(+), 43 deletions(-) New commits: commit 3e37dd39b6169af9928d5b959c40ba79a07450ee Author: Alan Coopersmith [EMAIL PROTECTED] Date: Wed Aug 22 13:23:30 2007 -0700 Version bump: 3.5.7 diff --git a/configure.ac b/configure.ac index ff7e245..2f56e4d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # $Id$ AC_PREREQ(2.57) -AC_INIT([libXpm], 3.5.6, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXpm) +AC_INIT([libXpm], 3.5.7, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXpm) AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2]) commit d82244497b54889f91c78585374d1ad6a0cef2cf Author: Alan Coopersmith [EMAIL PROTECTED] Date: Wed Aug 22 13:08:42 2007 -0700 Replace strcpy with strncpy to match previous code block diff --git a/src/WrFFrI.c b/src/WrFFrI.c index 6477188..15043e8 100644 --- a/src/WrFFrI.c +++ b/src/WrFFrI.c @@ -139,7 +139,8 @@ XpmWriteFileFromXpmImage(filename, image, info) } if (strchr(name, '-')) { if (name != new_name) { - strcpy(new_name, name); + strncpy(new_name, name, sizeof(new_name)); + new_name[sizeof(new_name)-1] = '\0'; name = new_name; } /* change '-' to '_' */ commit 47c974872b51b8c1d6965eff4599f8ce739bcedc Author: Alan Coopersmith [EMAIL PROTECTED] Date: Mon Aug 6 14:22:48 2007 -0700 Use srcdir in paths passed to xgettext when making .po files diff --git a/cxpm/Makefile.am b/cxpm/Makefile.am index 158facb..097a640 100644 --- a/cxpm/Makefile.am +++ b/cxpm/Makefile.am @@ -41,8 +41,8 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man if USE_GETTEXT noinst_DATA = cxpm.po -cxpm.po: $(cxpm_SOURCES) - xgettext -cL10N_Comments -d cxpm -n $(cxpm_SOURCES) +cxpm.po: $(cxpm_SOURCES:%=$(srcdir)/%) + xgettext -cL10N_Comments -d cxpm -n $(cxpm_SOURCES:%=$(srcdir)/%) CLEANFILES += cxpm.po endif diff --git a/sxpm/Makefile.am b/sxpm/Makefile.am index 0b9771a..7780bd8 100644 --- a/sxpm/Makefile.am +++ b/sxpm/Makefile.am @@ -45,8 +45,8 @@ SUFFIXES = .$(APP_MAN_SUFFIX) .man if USE_GETTEXT noinst_DATA = sxpm.po -sxpm.po: $(sxpm_SOURCES) - xgettext -cL10N_Comments -d sxpm -n $(sxpm_SOURCES) +sxpm.po: $(sxpm_SOURCES:%=$(srcdir)/%) + xgettext -cL10N_Comments -d sxpm -n $(sxpm_SOURCES:%=$(srcdir)/%) CLEANFILES += sxpm.po endif commit 6e003fd5f174a8e312d799d7f8812c2a5b87e433 Author: Alan Coopersmith [EMAIL PROTECTED] Date: Mon Aug 6 12:59:04 2007 -0700 Replace index/rindex with C89 standard strchr/strrchr diff --git a/src/WrFFrI.c b/src/WrFFrI.c index 363f6c4..6477188 100644 --- a/src/WrFFrI.c +++ b/src/WrFFrI.c @@ -117,9 +117,9 @@ XpmWriteFileFromXpmImage(filename, image, info) #ifdef VMS name = filename; #else - if (!(name = rindex(filename, '/')) + if (!(name = strrchr(filename, '/')) #ifdef AMIGA -!(name = rindex(filename, ':')) +!(name = strrchr(filename, ':')) #endif ) name = filename; @@ -127,24 +127,24 @@ XpmWriteFileFromXpmImage(filename, image, info) name++; #endif /* let's try to make a valid C syntax name */ - if (index(name, '.')) { + if (strchr(name, '.')) { strncpy(new_name, name, sizeof(new_name)); new_name[sizeof(new_name)-1] = '\0'; /* change '.' to '_' */ name = s = new_name; - while ((dot = index(s, '.'))) { + while ((dot = strchr(s, '.'))) { *dot = '_'; s = dot; } } - if (index(name, '-')) { + if (strchr(name, '-')) { if (name != new_name) { strcpy(new_name, name); name = new_name; } /* change '-' to '_' */ s = name; - while ((dot = index(s, '-'))) { + while ((dot = strchr(s, '-'))) { *dot = '_'; s = dot; } diff --git a/src/data.c b/src/data.c index d0b86ee..87f4b3f 100644 --- a/src/data.c +++ b/src/data.c @@ -422,7 +422,7 @@ xpmParseHeader(data) if (!l) return (XpmFileInvalid); buf[l] = '\0'; - ptr = rindex(buf, '_'); + ptr = strrchr(buf, '_'); if (!ptr || strncmp(_format, ptr, l - (ptr - buf))) return XpmFileInvalid; /* this is definitely an XPM 1 file
libxpm: Changes to 'upstream-unstable'
New branch 'upstream-unstable' available with the following commits: commit 3c881daddcc251d6e806715d267e4e55934abd1a Author: Alan Coopersmith [EMAIL PROTECTED] Date: Tue Nov 21 15:13:44 2006 -0800 Add *~ to .gitignore to skip over emacs/patch droppings commit 60817dd28774540622ea404f650db8389c66da54 Author: Adam Jackson [EMAIL PROTECTED] Date: Fri Oct 13 16:23:49 2006 -0400 Bump to 3.5.6 commit 12dc4dc15234ae818a21c20ebf7b2d053b7a94be Author: Alan Coopersmith [EMAIL PROTECTED] Date: Thu Jul 13 14:59:03 2006 -0700 renamed: .cvsignore - .gitignore commit 4daea919c3aa104b6caf8c0f42f49ae755545986 Author: Alan Coopersmith [EMAIL PROTECTED] Date: Sat Jun 3 06:11:30 2006 + Always initialize atomTable to NULL, so xpmHashTableFree() doesn't try to free a random value from the stack if xpmHashTableInit returns an error. commit 19855d6e09aa36db7686ad6f538179bf87e9c6ea Author: Alan Coopersmith [EMAIL PROTECTED] Date: Fri Jun 2 19:48:01 2006 + Coverity #1432: Returned without freeing storage hints_cmt (in error case when xpmHashTableInit failed) commit 000abcd371d0c4b1d0a5380023d74bf5bfc47685 Author: Alan Coopersmith [EMAIL PROTECTED] Date: Fri Jun 2 19:33:29 2006 + Coverity #1415: Returned without freeing storage hints_cmt (in error case when xpmHashTableInit failed) commit 5c70c99833d4040aaf595d0005b861e0a930ee66 Author: Adam Jackson [EMAIL PROTECTED] Date: Thu Apr 27 00:19:37 2006 + Bump to 3.5.5 commit 2dcc187c92c1a579e6e9f0bad999a3b4e47228c3 Author: Matthieu Herrb [EMAIL PROTECTED] Date: Sat Mar 18 15:18:56 2006 + doublecheck that a pointer is not NULL before dereferencing it. (Coverity CID 121). commit 93421a53ccf159ff39bc9f8ff72c57246f9cb90c Author: Kevin E Martin [EMAIL PROTECTED] Date: Thu Dec 15 00:24:31 2005 + Update package version number for final X11R7 release candidate. commit 2b229ddcb52a3bf9bef32e764f93cc57c1351420 Author: Kevin E Martin [EMAIL PROTECTED] Date: Tue Dec 6 22:48:44 2005 + Change *man_SOURCES == *man_PRE to fix autotools warnings. commit 50214deb692a9af760088f8e7a51955c7d3f1707 Author: Kevin E Martin [EMAIL PROTECTED] Date: Sat Dec 3 05:49:44 2005 + Update package version number for X11R7 RC3 release. commit 19881d3c88ff0713ef550382fd0dfb03123dabed Author: Alan Coopersmith [EMAIL PROTECTED] Date: Mon Nov 28 22:03:06 2005 + Change *mandir targets to use new *_MAN_DIR variables set by xorg-macros.m4 update to fix bug #5167 (Linux prefers *.1x man pages in man1 subdir) commit a6fbdb403efd3bf7e1179660959fd0e66a301ce0 Author: Kevin E Martin [EMAIL PROTECTED] Date: Sat Nov 19 07:15:42 2005 + Update pkgconfig files to separate library build-time dependencies from application build-time dependencies, and update package deps to work with separate build roots. commit 82513d04a8381da8d2281d7581f6b0d65901aede Author: Alan Coopersmith [EMAIL PROTECTED] Date: Sun Nov 13 02:08:07 2005 + Use sed to substitute variables in man pages commit d1b430289b2ddb6c1f3383c5288aa125b058508a Author: Kevin E Martin [EMAIL PROTECTED] Date: Wed Nov 9 21:19:13 2005 + Update package version number for X11R7 RC2 release. commit e2c9276ccc1ef619dcfbdeb414ef0dec5113c1ee Author: Alan Coopersmith [EMAIL PROTECTED] Date: Sat Oct 29 02:26:49 2005 + Add --enable-stat-zfile (on by default) to replace Imake's ZFILEDEF = -DSTAT_ZFILE to enable automatically searching for file.xpm.Z file.xpm.gz when file.xpm is requested. commit 2f57ab95012d9221cca1af6c0a1ccea5d308c66f Author: Kevin E Martin [EMAIL PROTECTED] Date: Wed Oct 19 02:48:11 2005 + Update package version number for RC1 release. commit 72bf88ed120fb888c57ed3223faa316403031b36 Author: Kevin E Martin [EMAIL PROTECTED] Date: Wed Oct 5 20:24:14 2005 + Add missing files to EXTRA_DIST Fix man page installation commit 08c43c5f1f851c1acad360a28767670dc62d8a66 Author: Matthieu Herrb [EMAIL PROTECTED] Date: Mon Oct 3 19:53:58 2005 + Last argument of variable parameter list needs to be casted to a pointer type. commit 5ecad7c12c3104d653972385f548e3f86532cbe3 Author: Kevin E Martin [EMAIL PROTECTED] Date: Fri Jul 29 21:22:52 2005 + Various changes preparing packages for RC0: - Verify and update package version numbers as needed - Implement versioning scheme - Change bug address to point to bugzilla bug entry form - Disable loadable i18n in libX11 by default (use --enable-loadable-i18n to reenable it) - Fix makedepend to use pkgconfig and pass distcheck - Update build script to build macros first - Update modular Xorg version commit 703207d3b3718223d4b2711fb77fc96a4f3909ef Author: Matthieu Herrb [EMAIL PROTECTED] Date: Sun Jul 17 10:32:57 2005 + fix build outside of $(srcdir) commit 5a0177d4474787951c0cae56e285bb075ab405f3