Contents of /trunk/kernel-magellan/patches-4.20/0109-4.20.10-all-fixes.patch
Parent Directory | Revision Log
Revision 3286 -
(show annotations)
(download)
Mon Mar 4 10:35:56 2019 UTC (5 years, 6 months ago) by niro
File size: 866 byte(s)
Mon Mar 4 10:35:56 2019 UTC (5 years, 6 months ago) by niro
File size: 866 byte(s)
linux-4.20.10
1 | diff --git a/Makefile b/Makefile |
2 | index c9b831f5e873..6f7a8172de44 100644 |
3 | --- a/Makefile |
4 | +++ b/Makefile |
5 | @@ -1,7 +1,7 @@ |
6 | # SPDX-License-Identifier: GPL-2.0 |
7 | VERSION = 4 |
8 | PATCHLEVEL = 20 |
9 | -SUBLEVEL = 9 |
10 | +SUBLEVEL = 10 |
11 | EXTRAVERSION = |
12 | NAME = Shy Crocodile |
13 | |
14 | diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c |
15 | index d0078cbb718b..7cde3f46ad26 100644 |
16 | --- a/fs/binfmt_script.c |
17 | +++ b/fs/binfmt_script.c |
18 | @@ -42,14 +42,10 @@ static int load_script(struct linux_binprm *bprm) |
19 | fput(bprm->file); |
20 | bprm->file = NULL; |
21 | |
22 | - for (cp = bprm->buf+2;; cp++) { |
23 | - if (cp >= bprm->buf + BINPRM_BUF_SIZE) |
24 | - return -ENOEXEC; |
25 | - if (!*cp || (*cp == '\n')) |
26 | - break; |
27 | - } |
28 | + bprm->buf[BINPRM_BUF_SIZE - 1] = '\0'; |
29 | + if ((cp = strchr(bprm->buf, '\n')) == NULL) |
30 | + cp = bprm->buf+BINPRM_BUF_SIZE-1; |
31 | *cp = '\0'; |
32 | - |
33 | while (cp > bprm->buf) { |
34 | cp--; |
35 | if ((*cp == ' ') || (*cp == '\t')) |