Merge pull request #210 from liuchao173/master

check whether savedptr is NULL before invoking strlen
This commit is contained in:
Neil Horman 2022-06-08 08:36:01 -04:00 committed by GitHub
commit 84a517eae8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)