Commit 09a33f05 authored by Hartmut Knaack's avatar Hartmut Knaack Committed by Jonathan Cameron

tools:iio:iio_event_monitor: check if event is fully read

Check that the read event is of the expected size.
Signed-off-by: default avatarHartmut Knaack <knaack.h@gmx.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent efa86e9f
...@@ -310,6 +310,12 @@ int main(int argc, char **argv) ...@@ -310,6 +310,12 @@ int main(int argc, char **argv)
} }
} }
if (ret != sizeof(event)) {
printf("Reading event failed!\n");
ret = -EIO;
break;
}
print_event(&event); print_event(&event);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment