summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-27man pages: Add missing word 'function' where neededAlan Coopersmith
A number of instances of 'The Xpm... function' were missing the word "function", so read awkwardly. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-08-27man pages: Make function synopses more consistent with other pagesAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-08-26man pages: Fix shadow man pagesAlan Coopersmith
Shadow man pages have a .so line that needs to list the file to be shown, not the name of the shadow page. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-08-26man pages: Make file names consistent with their displayed namesAlan Coopersmith
Lets users view the pages using the name displayed on the pages Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-17gitlab CI: add a basic build testAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-17man: strip trailing whitespaceAlan Coopersmith
git diff -w shows no changes from this commit Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-17Fix spelling/wording issuesAlan Coopersmith
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2022-07-17Build xz tarballs instead of bzip2Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-12-25update man pagesWalter Harms
move from k&r to ansi prototypes improve nroff coding Signed-off-by: Walter Harms <wharms@bfs.de>
2019-12-24add man pages based on doc/xpm.PSWalter Harms
More or less hand crafted man pages based on xpm.PS. Prototypes are still in K&R, see also is a dud Signed-off-by: Walter Harms <wharms@bfs.de>
2019-12-13libXpm 3.5.13libXpm-3.5.13Peter Hutterer
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-12-06parse: simplify error paths in xpmParseColors()Benjamin Tissoires
We introduced a new label to handle the errors, we should use it for the rest of the function. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2019-12-06parse: avoid memleak on error with STRLCAT/STRLCPYPeter Hutterer
The original macro might exit the function without freeing `colorTable`. Move the macros into a slightly less awful helper function and use goto to clean up in case of error. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2019-05-03Allow usage when fork() is not availableFabrice Fontaine
When fork() is not available, we need to define NO_ZPIPE so that libXpm doesn't try to fork/exec to use a pipe to uncompress compressed .xpm files. There is obviously a loss of functionality, but loading uncompressed .xpm files should continue to work. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> [Retrieved from: https://git.buildroot.net/buildroot/tree/package/x11r7/xlib_libXpm/0001-fork-check.patch] Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2018-12-07Update configure.ac bug URL for gitlab migrationAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-11-19Update README for gitlab migrationAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2018-10-06After fdopen(), use fclose() instead of close() in error pathAlan Coopersmith
Found by Oracle's Parfait 2.2 static analyzer: Error: File Leak File Leak [file-ptr-leak]: Leaked File fp at line 94 of lib/libXpm/src/RdFToBuf.c in function 'XpmReadFileToBuffer '. fp initialized at line 86 with fdopen fp leaks when len < 0 at line 92. Introduced-by: commit 8b3024e6871ce50b34bf2dff924774bd654703bc Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-09-22Windows build fixesDave Bodenstab
https://bugs.freedesktop.org/show_bug.cgi?id=46475 https://bugs.freedesktop.org/attachment.cgi?id=57479 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2017-01-26autogen: add default patch prefixMihail Konev
Signed-off-by: Mihail Konev <k.mvc@ya.ru>
2017-01-26autogen.sh: use quoted string variablesEmil Velikov
Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent fall-outs, when they contain space. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-01-26autogen.sh: use exec instead of waiting for configure to finishPeter Hutterer
Syncs the invocation of configure with the one from the server. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2016-12-12libXpm 3.5.12libXpm-3.5.12Matthieu Herrb
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
2016-12-12Handle size_t in file/buffer lengthTobias Stoeckmann
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 <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
2016-12-12Avoid OOB write when handling malicious XPM files.Tobias Stoeckmann
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 <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
2016-12-12Gracefully handle EOF while parsing files.Tobias Stoeckmann
libXpm does not properly handle EOF conditions when xpmGetC is called multiple times in a row to construct a string. Instead of checking its return value for EOF, the result is automatically casted into a char and attached to a string. By carefully crafting the color table in an XPM file, it is possible to send a libXpm program like gimp into a very long lasting loop and massive memory allocations. Otherwise no memory issues arise, therefore this is just a purely functional patch to dismiss invalid input. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <Matthieu@herrb.eu>
2016-12-12Fix out out boundary read on unknown colorsTobias Stoeckmann
libXpm is vulnerable to an out of boundary read if an XPM file contains a color with a symbolic name but without any default color value. A caller must set XpmColorSymbols and a color with a NULL name in the supplied XpmAttributes to XpmReadFileToImage (or other functions of this type) in order to trigger this issue. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
2014-03-19Fix abs() usage.Jörg Sonnenberger
For long arguments, use labs(). Reviewed-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
2013-09-07libXpm 3.5.11libXpm-3.5.11Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-09-07Fix typo in COPYING (matches src/amigax.h)Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-08-02Add noreturn attributes suggested by gccAlan Coopersmith
Remove extra bogus return added to avoid warnings when calling Punt() since gcc didn't know it would never return. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-06-19doclifter can't handle more than one dash in a name line.Eric S. Raymond
2013-05-31Fix libXpm build with NO_ZPIPEClaudio Bley
When NO_ZPIPE is defined, fcntl.h is not included in WrFFrI.c although OpenWriteFile uses open, O_WRONLY, O_CREAT and O_TRUNC. * src/WrFFrI.c: unconditionally include fcntl.h regardless of NO_ZPIPE being defined or not. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-31Added 'const' attribute to all filename arguments in the APIChristophe CURIS
The filename is always a read-only argument, so it is a good idea to let the caller now about it. This patch does not change active code; the place where the attribute is added will not break source-level compatibility because it adds no restriction on caller side, just adds information; because the lib code behaved the same way it will not break the binary interface either. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-31Added 'const' qualifier to the filename argument to internal functionsChristophe CURIS
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-04-23Close fd if fdopen() or xpmPipeThrough() fails in OpenWriteFile()Alan Coopersmith
Fixes leak found by parfait 1.1 bug checking tool: File Descriptor Leak: Leaked File Descriptor fd at line 350 of lib/libXpm/src/WrFFrI.c in function 'OpenWriteFile'. fd initialized at line 332 with open fd leaks when strcmp(".Z", (filename + (len - 2))) != 0 at line 337 and strcmp(".gz", (filename + (len - 3))) != 0 at line 340. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
2013-01-15autogen.sh: Implement GNOME Build APIColin Walters
http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson <ajax@redhat.com>
2013-01-15configure: Remove AM_MAINTAINER_MODEAdam Jackson
Signed-off-by: Adam Jackson <ajax@redhat.com>
2012-10-27Define NO_ZPIPE when building for MinGWJon TURNEY
Define NO_ZPIPE when building for MinGW, decompressing via a pipe isn't implemented. (since xpmPipeThrough() is only written in terms of fork() currently...) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Colin Harrison <colin.harrison@virgin.net> Reviewed-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net> Reviewed-by: Ángel González <ingenit@zoho.com>
2012-03-07libXpm 3.5.10libXpm-3.5.10Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-11-18closeness_cmp: maintain constness when casting pointersAlan Coopersmith
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.coopersmith@oracle.com>
2011-11-18sxpm: make ErrorMessage take const char * arg to fix -Wwrite-strings warningsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-11-11Include missing headersJeremy Huddleston
This fixes implicit declarations for strdup and strcasecmp. Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-10Fix gcc -Wwrite-strings warnings that don't require public API changesAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-11-10Assume C89 and just use const, not local Const macroAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-09-24Link sxpm against -lX11Julien Cristau
It calls various Xlib functions so should link with -lX11 directly. Signed-off-by: Julien Cristau <jcristau@debian.org>
2011-09-16Strip trailing whitespaceAlan Coopersmith
Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}' git diff -w & git diff -b show no diffs from this change Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-03-05man: add missing title header (.TH) __xorgversion__Gaetan Nadon
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-03-05config: move man pages into their own directoryGaetan Nadon
As per X.Org guidelines. Fix whitespace issues. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2011-02-02config: minor layout change in configure.acGaetan Nadon
Group statements per section as per Autoconf standard layout Quote statements where appropriate. No functional configuration changes This helps automated maintenance and release activities. Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2010-10-29libXpm 3.5.9libXpm-3.5.9Alan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>