summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* whitespace fixThomas E. Dickey2022-09-117-27/+27
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* use _X_UNUSED for compiler-warningsThomas E. Dickey2022-09-113-4/+8
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* use _Xconst with DataInt32/DataInt16/memcpy to reduce strict compiler warningsThomas E. Dickey2022-09-117-16/+16
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* use casts to reduce compiler warnings (no object change)Thomas E. Dickey2022-09-0913-252/+252
| | | | 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>
* additional cppcheck-scope warningThomas E. Dickey2022-09-081-1/+3
| | | | Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
* amend cppcheck-scope change, fixing c89 buildThomas E. Dickey2022-09-084-25/+41
| | | | 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-074-9/+9
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Reduce variable scopes as recommended by cppcheckAlan Coopersmith2022-09-079-78/+89
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Remove unnecessary casts from malloc & free callsAlan Coopersmith2022-09-072-4/+4
| | | | | | These are not needed in C89 and later Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* fix coredumps in XRenderComputeTrapezoids (issue #1)Dmitry Karasik2022-07-181-9/+18
| | | | | | | | | | | | Rationale: I don't have enough expertise to judge on how the tessellation algorithm is broken in XRenderComputeTrapezoids but I do trust Keith Packard that it is. However using cairo for proper tessellation, as he suggests, is too heavyweight, and here I propose to alter the code to at least do not cause coredumps. Even if/when the function will be marked as obsolete, I believe it is pretty much capable of rendering relatively simple shapes, and still retains some value.
* Add missing HAVE_CONFIG_H guard to Xrenderint.hRobin Linden2022-01-071-1/+3
| | | | Signed-off-by: Robin Linden <dev@robinlinden.eu>
* 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
* Avoid OOB write in XRenderQueryFiltersTobias Stoeckmann2016-09-251-1/+12
| | | | | | | | | | | | | | | The memory for filter names is reserved right after receiving the reply. After that, filters are iterated and each individual filter name is stored in that reserved memory. The individual name lengths are not checked for validity, which means that a malicious server can reserve less memory than it will write to during each iteration. v2: consume remaining bytes in reply buffer on error. Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
* Fix request length calculation for XRenderCompositeText32Clemens Eisserer2013-11-231-1/+1
| | | | | | | | | | | | Request length calculation inside XRenderCompositeText32 is broken for the case where the number of glyphs fits exactky inside the last xGlyphElt. In XRenderCompositeText8 and XRenderCompositeText16 this case is handled properly, somehow the "-1" got missing in XRenderCompositeText32. Reviewed-by: Keith Packard <keithp@keithp.com>
* Remove fallback for _XEatDataWords, require libX11 1.6 for itMichael Joost2013-11-221-14/+0
| | | | | | | | | | | | | _XEatDataWords was orignally introduced with the May 2013 security patches, and in order to ease the process of delivering those, fallback versions of _XEatDataWords were included in the X extension library patches so they could be applied to older versions that didn't have libX11 1.6 yet. Now that we're past that hurdle, we can drop the fallbacks and just require libX11 1.6 for building new versions of the extension libraries. Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* 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>
* integer overflow in XRenderQueryFilters() [CVE-2013-1987 1/3]Alan Coopersmith2013-05-031-14/+25
| | | | | | | | | | | The length, numFilters & numAliases members of the reply are all CARD32 and need to be bounds checked before multiplying & 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-033-3/+17
| | | | | | rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Fix alpha premultiplication in XRenderParseColor.Emanuele Giaquinta2012-02-281-3/+3
| | | | | | | Due to C arithmetic conversion rules we must use an unsigned constant (or a cast) to perform the multiplication using unsigned arithmetic. Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
* Strip trailing whitespaceAlan Coopersmith2011-09-1612-119/+119
| | | | | | | 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>
* Purge macros NEED_EVENTS and NEED_REPLIESFernando Carrijo2010-07-081-2/+0
| | | | | | Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Always call SyncHandle after issuing an X request.Jamey Sharp2010-04-091-0/+1
|
* Migrate to xorg macros 1.3 & XORG_DEFAULT_OPTIONSAlan Coopersmith2009-10-011-1/+2
| | | | Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
* Janitor: make distcheck, compiler warnings, .gitignore.Paulo Cesar Pereira de Andrade2009-01-305-29/+23
|
* Use Data instead of Data32 to avoid truncating the filter parameters on ↵Pierre-Loup Griffais2008-04-181-1/+1
| | | | | | 64-bit systems. Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
* nuke RCS IdsMatthieu Herrb2008-03-091-2/+0
|
* Properly set length field in gradient requests (bug 9526).David Reveman2007-08-201-3/+9
|
* Const-ified the filter argument to XRenderSetPictureFilter().Tilman Sauerbeck2006-09-161-1/+1
|
* renamed: .cvsignore -> .gitignoreAlan Coopersmith2006-07-131-0/+0
|
* Coverity #428: Fix a potential NULL chase. Coverity #930: Verify that aXORG-7_0_99_901Adam Jackson2006-04-031-11/+11
| | | | malloc succeeds.
* Add check and cflags for malloc(0) returning NULL.Kevin E Martin2005-12-031-1/+1
|
* Modify modular libs to use Xregion.h instead of region.hKevin E Martin2005-07-231-3/+1
|
* lib/Xrender/Picture.c Change region.h to Xregion.h and modify internalXORG-6_8_99_903XORG-6_8_99_902XORG-6_8_99_901XORG-6_8_99_900XORG-6_8_99_16Kevin E Martin2005-07-231-1/+1
| | | | references to include <X11/Xregion.h>.
* Use correct path to region.h.Daniel Stone2005-07-191-1/+1
|
* Add .cvsignore filesKeith Packard2005-07-091-0/+6
|
* Add support for gradients and solid fills to Render.Lars Knoll2005-07-011-0/+123
|
* Use $(top_srcdir)/... instead of $(top_builddir)/... in INCLUDES AddedAlexander Gottwald2005-06-091-2/+2
| | | | $(top_srcdir) to INCLUDES
* - Add Xrender build systemSøren Sandmann Pedersen2005-05-191-0/+28
|
* - 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-1913-0/+39
| | | | - Add Xrender to symlink.sh
* Encoding of numerous files changed to UTF-8sco_port_update-baseXORG-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_1sco_port_updateMarkus Kuhn2004-12-0411-11/+11
|
* Update to version 0.9 of Xrender (includes XRenderAddTraps)rel-0-6-1lg3d-rel-0-7-0lg3d-rel-0-6-2lg3d-baseXORG-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_1lg3d-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-branchKeith Packard2004-08-071-0/+67
|
* 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-2313-109/+341
|
* Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004xf86-4_4_99_1Egbert Eich2004-03-1413-13/+13
|
* Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004xf86-4_4_0STSF-CURRENTEgbert Eich2004-03-0313-13/+13
|
* readding XFree86's cvs IDsxf86-4_3_99_903Egbert Eich2004-02-2613-13/+13
|