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

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/kallsyms.c+2−2
@@ -118,8 +118,8 @@ static int read_symbol(FILE *in, struct sym_entry *s) · 117 unmodified lines
118 fprintf(stderr, "Read error or end of file.\n");118 fprintf(stderr, "Read error or end of file.\n");
119 return -1;119 return -1;
120 }120 }
121 if (strlen(sym) > KSYM_NAME_LEN) {121 if (strlen(sym) >= KSYM_NAME_LEN) {
122 fprintf(stderr, "Symbol %s too long for kallsyms (%zu vs %d).\n"122 fprintf(stderr, "Symbol %s too long for kallsyms (%zu >= %d).\n"
123 "Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n",123 "Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n",
124 sym, strlen(sym), KSYM_NAME_LEN);124 sym, strlen(sym), KSYM_NAME_LEN);
125 return -1;125 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