aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modutils-24.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/modutils/modutils-24.c b/modutils/modutils-24.c
index 2b34954c0..bd650cab5 100644
--- a/modutils/modutils-24.c
+++ b/modutils/modutils-24.c
@@ -2474,6 +2474,7 @@ new_process_module_arguments(struct obj_file *f, const char *options)
2474 n = 0; 2474 n = 0;
2475 p = val; 2475 p = val;
2476 while (*p != 0) { 2476 while (*p != 0) {
2477 char sv_ch;
2477 char *endp; 2478 char *endp;
2478 2479
2479 if (++n > max) 2480 if (++n > max)
@@ -2482,14 +2483,17 @@ new_process_module_arguments(struct obj_file *f, const char *options)
2482 switch (*pinfo) { 2483 switch (*pinfo) {
2483 case 's': 2484 case 's':
2484 len = strcspn(p, ","); 2485 len = strcspn(p, ",");
2486 sv_ch = p[len];
2485 p[len] = 0; 2487 p[len] = 0;
2486 obj_string_patch(f, sym->secidx, 2488 obj_string_patch(f, sym->secidx,
2487 loc - contents, p); 2489 loc - contents, p);
2488 loc += tgt_sizeof_char_p; 2490 loc += tgt_sizeof_char_p;
2489 p += len; 2491 p += len;
2492 *p = sv_ch;
2490 break; 2493 break;
2491 case 'c': 2494 case 'c':
2492 len = strcspn(p, ","); 2495 len = strcspn(p, ",");
2496 sv_ch = p[len];
2493 p[len] = 0; 2497 p[len] = 0;
2494 if (len >= charssize) 2498 if (len >= charssize)
2495 bb_error_msg_and_die("string too long for %s (max %ld)", param, 2499 bb_error_msg_and_die("string too long for %s (max %ld)", param,
@@ -2497,6 +2501,7 @@ new_process_module_arguments(struct obj_file *f, const char *options)
2497 strcpy((char *) loc, p); 2501 strcpy((char *) loc, p);
2498 loc += charssize; 2502 loc += charssize;
2499 p += len; 2503 p += len;
2504 *p = sv_ch;
2500 break; 2505 break;
2501 case 'b': 2506 case 'b':
2502 *loc++ = strtoul(p, &endp, 0); 2507 *loc++ = strtoul(p, &endp, 0);