Thread (5 messages) 5 messages, 3 authors, 2015-03-19

Re: HID: wacom: check for wacom->shared before following the pointer

flat view

From: Dan Carpenter <hidden>
Date: 2015-03-19 16:50:07

On Thu, Mar 19, 2015 at 12:06:02PM -0400, Benjamin Tissoires wrote:
quoted
  1101  
  1102          for (i = 0; i < contacts_to_send; i++) {
  1103                  int offset = (byte_per_packet * i) + 1;
  1104                  bool touch = (data[offset] & 0x1) && !wacom->shared->stylus_in_proximity;
                                                              ^^^^^^^^^^^^^
I assume this hardware is always quirky so this won't cause a NULL
deref?
Yes. 24hdt has the quirk WACOM_QUIRK_MULTI_INPUT, so wacom->shared can
not be null. I wonder what we could put in the code to make static
checkers happy...
The static checker doesn't complain about this, I was just wondering.

regards,
dan carpenter
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help