check whether savedptr is NULL before invoking strlen
savedptr can be null in musl libc, so the strlen(NULL) will segfault Signed-off-by: Chao Liu <liuchao173@huawei.com>
This commit is contained in:
parent
4afec6e4f8
commit
522883505d
|
@ -178,7 +178,7 @@ void init_irq_class_and_type(char *savedline, struct irq_info *info, int irq)
|
|||
}
|
||||
|
||||
#ifdef AARCH64
|
||||
if (strlen(savedptr) > 0) {
|
||||
if (savedptr && strlen(savedptr) > 0) {
|
||||
snprintf(irq_fullname, PATH_MAX, "%s %s", last_token, savedptr);
|
||||
tmp = strchr(irq_fullname, '\n');
|
||||
if (tmp)
|
||||
|
|
Loading…
Reference in New Issue