If wcmFindProp cannot find the given property, it will return a negative error code. At the moment, this is taken as the success condition(!?) for the strip_actions case... Aside from being wrong, this has the potential to cause some nasty memory corruption.
Signed-off-by: Jason Gerecke <killert...@gmail.com> --- src/wcmXCommand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c index 6dd6c58..713836c 100644 --- a/src/wcmXCommand.c +++ b/src/wcmXCommand.c @@ -356,7 +356,7 @@ static void wcmFindActionHandler(WacomDevicePtr priv, Atom property, Atom **hand } offset = wcmFindProp(property, priv->strip_actions, ARRAY_SIZE(priv->strip_actions)); - if (offset < 0) + if (offset >= 0) { *handler = &priv->strip_actions[offset]; *action = &priv->strip_keys[offset]; -- 1.8.1.1 ------------------------------------------------------------------------------ Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much more. Get web development skills now with LearnDevNow - 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812 _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel