modpost: fix segfault in sym_is() with prefixed arches
Changes
1 files changed · +1 −1
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| scripts/mod/file2alias.c | modified | +1 | −1 | View file |
scripts/mod/file2alias.c
View filediff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 6f426af..220213e 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -804,7 +804,7 @@ static inline int sym_is(const char *symbol, const char *name)
match = strstr(symbol, name);
if (!match)
return 0;
- return match[strlen(symbol)] == '\0';
+ return match[strlen(name)] == '\0';
}
static void do_table(void *symval, unsigned long size,