kallsyms: Handle too long symbols in kallsyms.c
[ Upstream commit 6db2983cd8064808141ccefd75218f5b4345ffae ]
When checking for symbols with excessively long names,
account for null terminating character.
Fixes: f3462aa952
("Kbuild: Handle longer symbols in kallsyms.c")
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
980f44f8dd
commit
cacf3c0d82
1 changed files with 2 additions and 2 deletions
|
@ -120,8 +120,8 @@ static int read_symbol(FILE *in, struct sym_entry *s)
|
|||
fprintf(stderr, "Read error or end of file.\n");
|
||||
return -1;
|
||||
}
|
||||
if (strlen(sym) > KSYM_NAME_LEN) {
|
||||
fprintf(stderr, "Symbol %s too long for kallsyms (%zu vs %d).\n"
|
||||
if (strlen(sym) >= KSYM_NAME_LEN) {
|
||||
fprintf(stderr, "Symbol %s too long for kallsyms (%zu >= %d).\n"
|
||||
"Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n",
|
||||
sym, strlen(sym), KSYM_NAME_LEN);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue