aboutsummaryrefslogtreecommitdiffstats
path: root/fs/binfmt_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/binfmt_misc.c')
-rw-r--r--fs/binfmt_misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c
index c96b855d2a5e..fd8beb9657a2 100644
--- a/fs/binfmt_misc.c
+++ b/fs/binfmt_misc.c
@@ -411,12 +411,12 @@ static int parse_command(const char __user *buffer, size_t count)
411{ 411{
412 char s[4]; 412 char s[4];
413 413
414 if (!count)
415 return 0;
416 if (count > 3) 414 if (count > 3)
417 return -EINVAL; 415 return -EINVAL;
418 if (copy_from_user(s, buffer, count)) 416 if (copy_from_user(s, buffer, count))
419 return -EFAULT; 417 return -EFAULT;
418 if (!count)
419 return 0;
420 if (s[count-1] == '\n') 420 if (s[count-1] == '\n')
421 count--; 421 count--;
422 if (count == 1 && s[0] == '0') 422 if (count == 1 && s[0] == '0')