History

kallsyms: Handle too long symbols in kallsyms.c

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

Eugene Loh committed 7 years ago

Commit 6db29831 parent f17b5f01 file · +2 −2Browse files

Unified · Split

scripts/kallsyms.c+2−2
@@ -118,8 +118,8 @@ static int read_symbol(FILE *in, struct sym_entry *s) · 117 unmodified lines
118118 fprintf(stderr, "Read error or end of file.\n");
119119 return -1;
120120 }
121− if (strlen(sym) > KSYM_NAME_LEN) {
122− fprintf(stderr, "Symbol %s too long for kallsyms (%zu vs %d).\n"
121+ if (strlen(sym) >= KSYM_NAME_LEN) {
122+ fprintf(stderr, "Symbol %s too long for kallsyms (%zu >= %d).\n"
123123 "Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n",
124124 sym, strlen(sym), KSYM_NAME_LEN);
125125 return -1;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t