summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2013-05-04integer overflow in XRRGetProviderProperty() [CVE-2013-1986 4/4]Alan Coopersmith1-8/+14
If the reported number of properties is too large, the calculations to allocate memory for them may overflow, leaving us returning less memory to the caller than implied by the value written to *nitems. (Same as reported against libX11 XGetWindowProperty by Ilja Van Sprundel) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-04integer overflow in XRRGetOutputProperty() [CVE-2013-1986 3/4]Alan Coopersmith1-8/+14
If the reported number of properties is too large, the calculations to allocate memory for them may overflow, leaving us returning less memory to the caller than implied by the value written to *nitems. (Same as reported against libX11 XGetWindowProperty by Ilja Van Sprundel) Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-04integer overflow in XRRQueryProviderProperty() [CVE-2013-1986 2/4]Alan Coopersmith1-4/+9
Same problem as XRRQueryOutputProperty() that it was cloned from Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-04integer overflow in XRRQueryOutputProperty() [CVE-2013-1986 1/4]Alan Coopersmith1-4/+9
rep.length is a CARD32, while rbytes was a signed int, so rbytes = sizeof (XRRPropertyInfo) + rep.length * sizeof (long); could result in integer overflow, leading to an undersized malloc and reading data off the connection and writing it past the end of the allocated buffer. Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-05-03Use _XEatDataWords to avoid overflow of rep.length bit shiftingAlan Coopersmith7-17/+28
rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2013-01-18Replace deprecated Automake INCLUDES variable with AM_CPPFLAGSAlan Coopersmith1-1/+1
Excerpt https://lists.gnu.org/archive/html/automake/2012-12/msg00038.html - Support for the long-deprecated INCLUDES variable will be removed altogether in Automake 1.14. The AM_CPPFLAGS variable should be used instead. This variable was deprecated in Automake releases prior to 1.10, which is the current minimum level required to build X. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-09-06Constify a couple string arguments that are just copied, not modifiedAlan Coopersmith2-2/+2
Fixes compiler warnings when building app/xrandr: xrandr.c: In function ‘crtc_set_transform’: xrandr.c:1459:9: warning: passing argument 4 of ‘XRRSetCrtcTransform’ discards qualifiers from pointer target type X11/extensions/Xrandr.h:419:1: note: expected ‘char *’ but argument is of type ‘const char *’ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2012-07-19libXrandr: add support for provider objects.Dave Airlie4-2/+623
This adds the client side libXrandr support for randr 1.4, and provider objects. Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-02-29Fill in nameLen in XRROutputInfoDaniel Stone1-0/+1
Even though it probably makes more sense to just strlen() the name, for some reason there's a nameLen field in XRROutputInfo, so might as well actually fill it in. Signed-off-by: Daniel Stone <daniel@fooishbar.org> Reported-by: Leif Middelschulte <leif.middelschulte@gmail.com>
2011-09-16Strip trailing whitespaceAlan Coopersmith9-71/+71
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>
2010-07-08Purge macros NEED_EVENTS and NEED_REPLIESFernando Carrijo1-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>
2010-05-26Add parameter safety checkLeif Middelschulte1-1/+1
As mentioned in bugzilla ticket 28150. Calling '_XRRValidateCache' with 'improper' arguments results in a SEGV. This patch adds a parameter validation to the mentioned function. Signed-off-by: Leif Middelschulte <leif.middelschulte@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-02-16config: move CWARNFLAGS from configure.ac to Makefile.amGaetan Nadon1-1/+5
Compiler warning flags should be explicitly set in the makefile rather than being merged with other packages compiler flags. Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
2009-11-10GetCrtcGamma: Fix error handling.Adam Jackson1-6/+5
We didn't treat _XReply failure as fatal. Parsing an xError as a gamma ramp reply doesn't work that often. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2009-11-10GetCrtcGammaSize: Return 0, not garbage, on failureAdam Jackson1-1/+1
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2009-11-10SetScreenConfigAndRate: Document error handling betterAdam Jackson1-0/+1
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2009-11-10GetOutputProperty: Return the error code, not BadRequestAdam Jackson1-1/+1
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Jamey Sharp <jamey@minilop.net>
2009-01-30Send X_RRGetOutputPrimary when making an X_RRGetOutputPrimary requestKeith Packard1-1/+1
Using X_RRGetOutputProperty does not yield success here. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-30Janitor: make distcheck, compiler warnings, .gitignorePaulo Cesar Pereira de Andrade9-39/+13
Warning corrections are either unused symbols or using an integer as a pointer (generated by sparse).
2008-12-23Fix thinkosJulien Cristau2-5/+2
* XRRExtensionInfo can be static * XRRExtensionName is not called XrandrExtensionName
2008-12-17Define _XRRHasRates internally.Adam Jackson1-0/+3
2008-12-17Be sure to return NULL when returning no properties.Adam Jackson1-1/+1
2008-12-17Use RRCheckExtension in function returning a value.Adam Jackson1-1/+1
2008-12-17Fix type of GetReq() argument.Adam Jackson1-1/+1
2008-12-17Use RRSimpleCheckExtension in functions returning voidAdam Jackson1-1/+1
2008-12-08Add [GS]etOutputPrimaryget-set-primaryAdam Jackson1-0/+62
2008-12-04Nuke config-timestamp for panning.Matthias Hopf1-2/+0
2008-12-04Panning supportMatthias Hopf1-0/+97
2008-12-01RRNotify subevents have 'window' at different offsets, the sequelJulien Cristau1-1/+3
f176b2bda103f6f38aabab8207f47a02cc797659 fixed XRRWireToEvent, but XRREventToWire had the same bug. Signed-off-by: Julien Cristau <jcristau@debian.org>
2008-12-01Merge branch 'transform-proposal' of git.freedesktop.org:/git/xorg/lib/libXrandrJulien Cristau3-9/+210
Conflicts: src/Xrandr.c
2008-11-28Set attr->pendingNparams in XRRGetCrtcTransform()transform-proposalJulien Cristau1-0/+1
2008-11-24Add GetScreenResourcesCurrentgsr-currentAdam Jackson1-3/+20
2008-09-12Set NparamsFilter in XRRGetCrtcTransform return value.Keith Packard1-0/+1
Leaving this uninitialized isn't very helpful, and can cause segfaults.
2008-08-13RRNotify subevents have 'window' at different offsets.Tomas Carnecky1-1/+3
2008-08-13Remove RCS tags.Adam Jackson2-5/+0
2008-06-23Bug #16430: Ignore ConfigureNotify on non-root windows in UpdateConfigurationthb1-3/+5
2008-05-19Rename parameters to clarify QueryVersion/QueryExtension.Peter Hutterer1-3/+5
These parameters are not treated as input. Rename them to make the inner workings slightly more obvious. X.Org Bug 14511 <http://bugs.freedesktop.org/show_bug.cgi?id=14511>
2008-03-18Eliminate inverse matrix from randr transform protocolKeith Packard1-8/+0
It is easier, and potentially more precise, to compute the inverse in the server where everything can eventually be kept in floating point form.
2008-03-15Support CRTC Transform filtersKeith Packard1-74/+117
XRRGetCrtcTransform now returns a giant struct containing all of the transform and filter data. XRRSetCrtcTransform now accepts filter parameters.
2008-03-10Add support for new Transform requests.Keith Packard3-10/+176
2008-02-05Hide some private symbols.Julien Cristau1-5/+5
XExtensionInfo, XRRExtensionName, XRRFindDisplay, _XRRHasRates and _XRRVersionHandler are internal to libXrandr. Don't export them.
2007-07-03CrtcChange event format conversion was using 'height' for 'width'.Keith Packard1-2/+2
CrtcChange events were getting the source 'height' value stored in the 'width' target in both conversion directions.
2007-02-15Must pass size information in SetCrtcGamma request.Keith Packard1-0/+1
2007-01-31Merge 64-bit fixes inKeith Packard1-15/+17
2007-01-31Fix read sizes for 64-bit machines.Keith Packard1-30/+30
Be consistent in variable usage: nbytes = network byte length. rbytes = memory byte length. nbytesRead = actual network bytes read. Malloc rbytes data to pass to _XRead*, but use nbytes as the amount of data to read (yes, this is insane, welcome to Xlib). Some of this patch is semi-gratuitous, but the goal is to be consistent everywhere.
2007-01-16Return a valid property info even if we lack valid value sets.Eric Anholt1-16/+18
Previously, XRRQueryOutputProperty90 would return an uninitialized pointer if num_values was 0.
2007-01-06Avoid nested LockDisplay calls.Keith Packard1-13/+22
XRRFindDisplay must make extension requests that use LockDisplay, so don't call it with the display locked, instead pass the info around to the internal functions that were calling it themselves, having acquired the info before the outer LockDisplay is called.
2006-12-30Failed to copy rotations from reply to XRRCrtcInfo.Keith Packard1-0/+1
XRRGetCrtcInfo was not moving the rotations value from the wire reply structure to the XRRCrtcInfo being returned, leaving the value uninitialized.
2006-12-02Merge branch 'randr-1.2'Dave Airlie3-7/+187
2006-11-30Add initial implementation of crtc gamma and mode adding requests.randr-1.2Keith Packard3-7/+187
They build. More testing seems indicated.