Seems reasonable a zero based offset should check >= nitems value and
aligns with similar check in get_actions().

Reviewed-by: Chris Bagwell <ch...@cnpbagwell.com>

On Tue, Apr 3, 2012 at 5:00 PM, Jason Gerecke <killert...@gmail.com> wrote:

>
> Signed-off-by: Jason Gerecke <killert...@gmail.com>
> ---
>  tools/xsetwacom.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
> index 7cf0d05..28332d1 100644
> --- a/tools/xsetwacom.c
> +++ b/tools/xsetwacom.c
> @@ -1244,7 +1244,7 @@ static void special_map_property(Display *dpy,
> XDevice *dev, Atom btnact_prop, i
>                                AnyPropertyType, &type, &format,
> &btnact_nitems,
>                                &bytes_after, (unsigned
> char**)&btnact_data);
>
> -       if (offset > btnact_nitems)
> +       if (offset >= btnact_nitems)
>        {
>                fprintf(stderr, "Invalid offset into %s property.\n",
> XGetAtomName(dpy, btnact_prop));
>                goto out;
> --
> 1.7.9.5
>
>
>
> ------------------------------------------------------------------------------
> Better than sec? Nothing is better than sec when it comes to
> monitoring Big Data applications. Try Boundary one-second
> resolution app monitoring today. Free.
> http://p.sf.net/sfu/Boundary-dev2dev
> _______________________________________________
> Linuxwacom-devel mailing list
> Linuxwacom-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel
>
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
_______________________________________________
Linuxwacom-devel mailing list
Linuxwacom-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to