aboutsummaryrefslogtreecommitdiff
path: root/boot/bootflow.c
diff options
context:
space:
mode:
Diffstat (limited to 'boot/bootflow.c')
-rw-r--r--boot/bootflow.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/boot/bootflow.c b/boot/bootflow.c
index be543c8588..6922e7e0c4 100644
--- a/boot/bootflow.c
+++ b/boot/bootflow.c
@@ -752,7 +752,7 @@ int cmdline_set_arg(char *buf, int maxlen, const char *cmdline,
in_quote = false;
continue;
}
- if (*p == '=') {
+ if (*p == '=' && !arg_end) {
arg_end = p;
val = p + 1;
} else if (*p == '"') {
@@ -788,7 +788,8 @@ int cmdline_set_arg(char *buf, int maxlen, const char *cmdline,
}
/* if this is the target arg, update it */
- if (!strncmp(from, set_arg, arg_end - from)) {
+ if (arg_end - from == set_arg_len &&
+ !strncmp(from, set_arg, set_arg_len)) {
if (!buf) {
bool has_quote = val_end[-1] == '"';