Reported by Clang.
strace/evdev.c:157:3: note: The value 0 is assigned to 'size'
# size = tcp->u_rval * 8;
# ^~~~~~~~~~~~~~~~~~~~~~
strace/evdev.c:158:2: warning: Declared variable-length array (VLA)
has zero size
# char decoded_arg[size];
# ^
* evdev.c (decode_bitset_): Bail out before decoded_arg VLA definition.
size = max_nr;
else
size = tcp->u_rval * 8;
+
+ if (syserror(tcp) || !size) {
+ printaddr(arg);
+
+ return RVAL_IOCTL_DECODED;
+ }
+
char decoded_arg[size];
if (umove_or_printaddr(tcp, arg, &decoded_arg))