Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6db2983c authored by Eugene Loh's avatar Eugene Loh Committed by Masahiro Yamada
Browse files

kallsyms: Handle too long symbols in kallsyms.c



When checking for symbols with excessively long names,
account for null terminating character.

Fixes: f3462aa9 ("Kbuild: Handle longer symbols in kallsyms.c")
Signed-off-by: default avatarEugene Loh <eugene.loh@oracle.com>
Acked-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent f17b5f06
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -118,8 +118,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;