summaryrefslogtreecommitdiff
path: root/src/Xrender.c
Commit message (Collapse)AuthorAgeFilesLines
* whitespace fixThomas E. Dickey2022-09-111-2/+2
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* use _X_UNUSED for compiler-warningsThomas E. Dickey2022-09-111-1/+1
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* use casts to reduce compiler warnings (no object change)Thomas E. Dickey2022-09-091-26/+26
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* cppcheck (removing unused assignment lets variable scope reduction)Thomas E. Dickey2022-09-081-2/+3
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* amend cppcheck-scope change, fixing c89 buildThomas E. Dickey2022-09-081-15/+27
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* Rename xDepth to xPDepth to quiet -Wshadow warningsAlan Coopersmith2022-09-071-7/+7
| | | | | | | | | | | | | | | Xrender.c: In function ‘XRenderQueryFormats’: Xrender.c:406:19: warning: declaration of ‘xDepth’ shadows a global declaration [-Wshadow] xPictDepth *xDepth; ^~~~~~ In file included from /net/also.us.oracle.com/export/alanc/X.Org/amd64-gcc/install/usr/X11R7/include/X11/Xlibint.h:43:0, from Xrenderint.h:31, from Xrender.c:28: /net/also.us.oracle.com/export/alanc/X.Org/amd64-gcc/install/usr/X11R7/include/X11/Xproto.h:329:7: note: shadowed declaration is here } xDepth; ^~~~~~ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Resolve -Wsign-compare warningsAlan Coopersmith2022-09-071-2/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Reduce variable scopes as recommended by cppcheckAlan Coopersmith2022-09-071-23/+17
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove unnecessary casts from malloc & free callsAlan Coopersmith2022-09-071-2/+2
| | | | | | These are not needed in C89 and later Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Validate lengths while parsing server data.Tobias Stoeckmann2016-09-251-0/+18
| | | | | | | | | | | | | | Individual lengths inside received server data can overflow the previously reserved memory. It is therefore important to validate every single length field to not overflow the previously agreed sum of all invidual length fields. v2: consume remaining bytes in the reply buffer on error. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Reviewed-by: Matthieu Herrb@laas.fr
* integer overflow in XRenderQueryPictIndexValues() [CVE-2013-1987 3/3]Alan Coopersmith2013-05-051-9/+16
| | | | | | | | | | The length and numIndexValues members of the reply are both CARD32 and need to be bounds checked before multiplying by sizeof (XIndexValue) to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* integer overflow in XRenderQueryFormats() [CVE-2013-1987 2/3]Alan Coopersmith2013-05-051-14/+26
| | | | | | | | | | | The length, numFormats, numScreens, numDepths, and numVisuals members of the reply are all CARD32 and need to be bounds checked before multiplying and adding them together to come up with the total size to allocate, to avoid integer overflow leading to underallocation and writing data from the network past the end of the allocated buffer. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Use _XEatDataWords to avoid overflow of rep.length bit shiftingAlan Coopersmith2013-05-031-2/+2
| | | | | | rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Strip trailing whitespaceAlan Coopersmith2011-09-161-31/+31
| | | | | | | 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>
* Make DEPTH_MASK generate unsigned intsAlan Coopersmith2011-05-221-1/+1
| | | | | | | | Clears Sun compiler warning: "Xrender.c", line 127: warning: integer overflow detected: op "<<" since 1 << 31 overflows a signed 32-bit int. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Janitor: make distcheck, compiler warnings, .gitignore.Paulo Cesar Pereira de Andrade2009-01-301-13/+13
|
* Coverity #428: Fix a potential NULL chase. Coverity #930: Verify that aXORG-7_0_99_901Adam Jackson2006-04-031-11/+11
| | | | malloc succeeds.
* - Conditionally include config.h in xc/lib/Xrender/*.cXORG-6_8_99_9XORG-6_8_99_8XORG-6_8_99_13XORG-6_8_99_12XORG-6_8_99_11XORG-6_8_99_10Søren Sandmann Pedersen2005-05-191-0/+3
| | | | - Add Xrender to symlink.sh
* Muffle compiler warnings.COMPOSITEWRAPEgbert Eich2004-05-241-0/+1
| | | | | fix option name in log message. improve debugging messages.
* Merging XORG-CURRENT into trunkXACE-SELINUX-MERGEEgbert Eich2004-04-231-49/+277
|
* Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich2004-03-141-1/+1
|
* Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0STSF-CURRENTEgbert Eich2004-03-031-1/+1
|
* readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich2004-02-261-1/+1
|
* Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004Egbert Eich2004-02-261-1/+1
|
* Initial revisionXORG-RELEASE-1-BASEXEVIE-MERGEXEVIE-BASEXORG-STABLEXINERAMA_2XEVIEKaleb Keithley2003-11-141-0/+657