Once in a million years, args->arg_data_size becomes 0. When this happens and the argument being parsed is a string not coming from userspace, this causes the index dest[args->arg_data_size - 1] to 0xFFFFFFFF and causing a kernel panic.
Once in a million years, args->arg_data_size becomes 0. When this happens and the argument being parsed is a string not coming from userspace, this causes the index dest[args->arg_data_size - 1] to 0xFFFFFFFF and causing a kernel panic.

In this fix, we exit the callback with buffer full if arg_data_size is 0, and also replace strncpy with strlcpy, avoiding the need to call strlen again.

angeloc/sysdig,angeloc/sysdig,angeloc/sysdig,angeloc/sysdig,angeloc/sysdig