[PATCH v2 libXi 1/2] SizeClassInfo can return 0 even without an error
Emil Velikov
emil.l.velikov at gmail.com
Fri Oct 14 13:12:30 UTC 2016
On 13 October 2016 at 04:58, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> From: Niels Ole Salscheider <niels_ole at salscheider-online.de>
>
> Catch the error case separately. Commit 19a9cd607d added length checking to
> SizeClassInfo but re-used the return value of 0 for an error. A device without
> classes (as is initialized by xf86-input-libinput for tablets) can
> legitimately return 0 and erroneously triggers an error.
> Fix this by using a separate value for the error.
>
> Reproducible by calling XListInputDevices() with a tablet attached.
>
> This fixes a regression introduced in commit 19a9cd607d.
>
> Signed-off-by: Niels Ole Salscheider <niels_ole at salscheider-online.de>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> Changes to v1:
> - don't touch *size until we're sure.
> - expand commit message
>
A lot better imho.
Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
-Emil
More information about the xorg-devel
mailing list