libevdev: Better error handling, better handling of bitmask reads.

Since bitmasks are stored as arrays of longs, and sizeof(long) depends
on the platform you're on (32 or 64 bit), reading in bitmasks was
always done in sizeof(long) increments. If a device is 32 bits, it
would generate 4 bytes for the 'bit' bitmask, but then when reading,
we would expect 8, and overrun the log. With this CL, we look for
end-of-line and stop.

BUG=chromium:239070
TEST=Able to make and replay new Spring regression test

Change-Id: I286f2ed36df7d7c9c5b0588941c8a386466d0d40
Reviewed-on: https://gerrit.chromium.org/gerrit/50468
Reviewed-by: Dennis Kempin <denniskempin@chromium.org>
Commit-Queue: Andrew de los Reyes <adlr@chromium.org>
Tested-by: Andrew de los Reyes <adlr@chromium.org>
1 file changed
tree: cdc6c87953bf53afddfbebb7bb137243f033a393
  1. include/
  2. src/
  3. common.mk
  4. Makefile