diff options
author | Eugene Loh <eugene.loh@oracle.com> | 2019-01-17 14:46:00 -0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2019-05-02 21:41:30 +0100 |
commit | 2471851d39ac8c6e6eafab81dcdceefaec6ffe1f (patch) | |
tree | 18df2bdf83d1b27d9d64f3d3ca344e968b38df5a /scripts | |
parent | ee05d9a573c65a91e357997b11ca76d942de46d1 (diff) |
kallsyms: Handle too long symbols in kallsyms.c
commit 6db2983cd8064808141ccefd75218f5b4345ffae upstream.
When checking for symbols with excessively long names,
account for null terminating character.
Fixes: f3462aa952cf ("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>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/kallsyms.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index dc7aa45e80ce..49fae20e61e0 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -121,8 +121,8 @@ static int read_symbol(FILE *in, struct sym_entry *s) fprintf(stderr, "Read error or end of file.\n"); return -1; } - if (strlen(str) > KSYM_NAME_LEN) { - fprintf(stderr, "Symbol %s too long for kallsyms (%zu vs %d).\n" + if (strlen(str) >= 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", str, strlen(str), KSYM_NAME_LEN); return -1; |