* I would rather see getopt used, but evemu-event is small and simple so I'm ok with this parsing technique.
* In evemu-event there is not enough argument checking. strtol() calls do not have any error checking. If I specify a code, type, or value of 83mdu, it will use 83. The endptr should be checked to ensure the entire argument is valid. The arguments should also be bounds checked: 0 <= type <= USHRT_MAX, 0 <= code <= USHRT_MAX, INT_MIN <= value <= INT_MAX.
* When creating the sync event, use the evdev constants EV_SYN and SYN_REPORT.
* The sync event playing should be checked for errors too.
I think this is a really useful addition :). Thanks!
* I would rather see getopt used, but evemu-event is small and simple so I'm ok with this parsing technique.
* In evemu-event there is not enough argument checking. strtol() calls do not have any error checking. If I specify a code, type, or value of 83mdu, it will use 83. The endptr should be checked to ensure the entire argument is valid. The arguments should also be bounds checked: 0 <= type <= USHRT_MAX, 0 <= code <= USHRT_MAX, INT_MIN <= value <= INT_MAX.
* When creating the sync event, use the evdev constants EV_SYN and SYN_REPORT.
* The sync event playing should be checked for errors too.
I think this is a really useful addition :). Thanks!