aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/binfmt_misc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index c04ef1d4f18a..97aff2879cda 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -254,6 +254,7 @@ static char *scanarg(char *s, char del)
254 return NULL; 254 return NULL;
255 } 255 }
256 } 256 }
257 s[-1] ='\0';
257 return s; 258 return s;
258} 259}
259 260
@@ -378,8 +379,7 @@ static Node *create_entry(const char __user *buffer, size_t count)
378 p = scanarg(p, del); 379 p = scanarg(p, del);
379 if (!p) 380 if (!p)
380 goto einval; 381 goto einval;
381 p[-1] = '\0'; 382 if (!e->magic[0])
382 if (p == e->magic)
383 goto einval; 383 goto einval;
384 if (USE_DEBUG) 384 if (USE_DEBUG)
385 print_hex_dump_bytes( 385 print_hex_dump_bytes(
@@ -391,8 +391,7 @@ static Node *create_entry(const char __user *buffer, size_t count)
391 p = scanarg(p, del); 391 p = scanarg(p, del);
392 if (!p) 392 if (!p)
393 goto einval; 393 goto einval;
394 p[-1] = '\0'; 394 if (!e->mask[0]) {
395 if (p == e->mask) {
396 e->mask = NULL; 395 e->mask = NULL;
397 pr_debug("register: mask[raw]: none\n"); 396 pr_debug("register: mask[raw]: none\n");
398 } else if (USE_DEBUG) 397 } else if (USE_DEBUG)