Age | Commit message (Collapse) | Author | Files | Lines |
|
Not needed in C89 and later
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
It was always 0, hence caused gcc warnings:
XrrProvider.c: In function ‘XRRGetProviderInfo’:
XrrProvider.c:133:49: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
if (rep.length > INT_MAX >> 2 || rep.length < ProviderInfoExtra >> 2)
^
XrrProvider.c:135:17: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits]
if (rep.length < ProviderInfoExtra >> 2)
^
XrrProvider.c:135:5: warning: this condition has identical branches [-Wduplicated-branches]
if (rep.length < ProviderInfoExtra >> 2)
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
The responses of the connected X server have to be properly checked
to avoid out of boundary accesses that could otherwise be triggered
by a malicious server.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
|
|
This removes warnings about shadowing local variables with the same
name, and type mismatches with _XRead32.
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
|
|
Unlike most of the values returned by this function, which are arrays
of XIDs (long int), associated_capability is defined as an array of
unsigned int. _XRead32 reads 32-bit values from the wire protocol
and writes them to the provided buffer as an array of long ints, even
if that means expanding them from 32-bit to 64-bit. Doing that for
associated_capability resulted in a garbage value between each actual
value, and overflowing the provided buffer into the space for the
provider name (which is written later and would overwrite the overflowed
data).
Created xhiv libXrandr/XRRGetProviderInfo test case to test & confirm.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
|
|
rep.length is a CARD32, so rep.length << 2 could overflow in 32-bit builds
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
|
|
This adds the client side libXrandr support for randr 1.4,
and provider objects.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|