| Summary: | insmod/modprobe incorrectly parses several parameters in kernel 2.4 | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Leonid <lly.dev> |
| Component: | Other | Assignee: | unassigned |
| Status: | RESOLVED FIXED | ||
| Severity: | major | CC: | busybox-cvs |
| Priority: | P3 | ||
| Version: | 1.18.x | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Target: | linux 2.4 | |
| Build: | |||
| Attachments: | Proposed patch | ||
|
Description
Leonid
2011-02-10 18:57:31 UTC
- p = skip_whitespace(p);
- if (*p != ',')
- break;
+ if (*p != '\0') {
+ p = skip_whitespace(p);
+ if (*p != ',')
+ break;
+ }
p = skip_whitespace(p + 1);
And if *p == '\0' because we genuinely reached terminating NUL, not because we replaces ',' with '\0', then what p = skip_whitespace(p + 1) do?
I propose to save/restore the character, like this:
char sv_ch = p[len];
p[len] = '\0';
obj_string_patch(f, sym->secidx,
loc - contents, p);
loc += tgt_sizeof_char_p;
p += len;
*p = sv_ch;
You are right, my patch breaks some checks. Anyway, bug fixed & can be closed. Fixed in 1.19.x |