summaryrefslogtreecommitdiff
path: root/Bitmap.c
AgeCommit message (Collapse)Author
2023-02-05Ensure all *.c files include config.h before any other headersAlan Coopersmith
Makes sure that any flags set in config.h that affect system headers are applied equally across all source files. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2021-05-14bitmap: Fix a crash with underspecified dimensionsJeremy Mates
From the reporter on #xorg-devel: -!- thrig [thrig@unaffilaited/thrig] has joined #xorg-devel <thrig> where does the code for bitmap live? there's a crash (or who knows on some platforms) if you `bitmap -size 42`
2020-07-23Fix spelling/wording issuesAlan Coopersmith
Found by using: codespell --builtin clear,rare,usage,informal,code,names Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-06-01Use _CONST_X_STRING to make libXt declare String as const char *Alan Coopersmith
Clears 169 out of 240 -Wdiscarded-qualifiers warnings from gcc 7.3 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-12-29Stop memory leak in XmuWriteBitmapDataToFile()Alan Coopersmith
StripFilename() allocates a new string for its result, so after we're done with it, free it instead of just losing the pointer to it. Fixes errors found by Oracle Parfait 1.5.1 bug checking tool: Error: Memory leak (CWE 401) Memory leak of pointer basename allocated with StripFilename(filename) at line 712 of Bitmap.c in function 'XmuWriteBitmapDataToFile'. basename allocated at line 691 with StripFilename(filename). basename leaks when i >= data_length at line 702. Error: Memory leak (CWE 401) Memory leak of pointer basename allocated with StripFilename(filename) at line 715 of Bitmap.c in function 'XmuWriteBitmapDataToFile'. basename allocated at line 691 with StripFilename(filename). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-12-29Stop memory leaks from XtNewString(StripFilename(filename))Alan Coopersmith
StripFilename() already allocates a new string for its result, we don't need to duplicate it and then lose the pointer to the first one. Fixes errors found by Oracle Parfait 1.5.1 bug checking tool: Error: Memory leak (CWE 401) Memory leak of pointer pointer allocated with StripFilename(filename) at line 1119 of Bitmap.c in function 'BWReadFile'. pointer allocated at line 1106 with StripFilename(filename). pointer leaks when StripFilename(filename) != NULL at line 1106. Error: Memory leak (CWE 401) Memory leak of pointer pointer allocated with StripFilename(filename) at line 1119 of Bitmap.c in function 'BWReadFile'. pointer allocated at line 1106 with StripFilename(filename). Error: Memory leak (CWE 401) Memory leak of pointer pointer allocated with StripFilename(filename) at line 1222 of Bitmap.c in function 'BWWriteFile'. pointer allocated at line 1202 with StripFilename(filename). pointer leaks when StripFilename(filename) != NULL at line 1202. Error: Memory leak (CWE 401) Memory leak of pointer pointer allocated with StripFilename(filename) at line 1222 of Bitmap.c in function 'BWWriteFile'. pointer allocated at line 1202 with StripFilename(filename). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-01-01Avoid shadow declarationsJeremy Huddleston Sequoia
Bitmap.c:906:17: warning: declaration shadows a local variable [-Wshadow] unsigned char *image_data; ^ Bitmap.c:799:11: note: previous declaration is here char *image_data, *buffer_data; ^ Bitmap.c:907:8: warning: declaration shadows a local variable [-Wshadow] char *buffer_data; ^ Bitmap.c:799:24: note: previous declaration is here char *image_data, *buffer_data; ^ Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2014-01-01assert to avoid a NULL dereferenceJeremy Huddleston Sequoia
Bitmap.c:1246:8: warning: Dereference of null pointer **str = '\0'; ~~~~~~^~~~~~ 1 warning generated. Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
2012-05-29Fix pixmap leak in error paths of BWGetUnzoomedPixmapAlan Coopersmith
Found by Parfait 0.5.0.1 bug checking tool: Leaked X Resource pix at line 393 of Bitmap.c in function 'BWGetUnzoomedPixmap'. pix initialized at line 388 with XCreatePixmap(...). at line 414 of Bitmap.c in function 'BWGetUnzoomedPixmap'. pix initialized at line 409 with XCreatePixmap(...). Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-10-14Strip 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-10-14Constify filename string handlingAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2011-01-15Call snprintf() directly instead of XmuSnprintf()Alan Coopersmith
All platforms still supported by X.Org have long had snprintf() Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2009-09-22Strip RCS/CVS idsAlan Coopersmith
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2009-01-12Ansification and compile warning fixes.Paulo Cesar Pereira de Andrade
This also uses XORG_CHANGELOG and XORG_CWARNFLAGS, and corrects make distcheck.
2004-04-23Merging XORG-CURRENT into trunkxprint_packagertest_20041217_basexprint_packagertest_20041125_basesco_port_update-baserel-0-6-1lg3d-rel-0-7-0lg3d-rel-0-6-2lg3d-baseXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_7XORG-6_8_99_6XORG-6_8_99_5XORG-6_8_99_4XORG-6_8_99_3XORG-6_8_99_2XORG-6_8_99_15XORG-6_8_99_14XORG-6_8_99_13XORG-6_8_99_12XORG-6_8_99_11XORG-6_8_99_10XORG-6_8_99_1XORG-6_8_2XORG-6_8_1_904XORG-6_8_1_903XORG-6_8_1_902XORG-6_8_1_901XORG-6_8_1XORG-6_8_0XORG-6_7_99_904XORG-6_7_99_903XORG-6_7_99_902XORG-6_7_99_901XORG-6_7_99_2XORG-6_7_99_1XACE-SELINUX-MERGExprint_packagertest_20041217xprint_packagertest_20041125sco_port_updatelg3d-masterlg3d-eventlg3d-dev-0-7-1lg3d-dev-0-7-0lg3d-dev-0-6-latestlg3d-dev-0-6-2lg3d-dev-0-6-1-latestlg3d-dev-0-6-1-currentlg3d-dev-0-6-1-1lg3d-dev-0-6-1lg3dXORG-6_8-branchCOMPOSITEWRAPEgbert Eich
2004-03-14Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich
2004-03-03Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0STSF-CURRENTEgbert Eich
2004-02-26readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich
2004-02-26Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich
2003-11-14XFree86 4.3.0.1xf86-4_3_0_1PRE_xf86-4_3_0_1Kaleb Keithley
2003-11-14R6.6 is the Xorg base-lineXORG-MAINKaleb Keithley