DM: avoid NULL pointer dereferenced in 'ioc_parse()'
Pointer 'tmp' may be NULL before passing it to 'strtoul()'
@@ -1043,6 +1043,7 @@ ioc_parse(const char *opts)
snprintf(virtual_uart_path, sizeof(virtual_uart_path), "%s", param);
if (tmp != NULL) {
tmp = strtok(NULL, ",");
+ if (tmp != NULL)
ioc_boot_reason = strtoul(tmp, 0, 0);
}
free(param);
