Contents of /trunk/kernel-alx/patches-4.9/0257-4.9.158-all-fixes.patch
Parent Directory | Revision Log
Revision 3310 -
(show annotations)
(download)
Tue Mar 12 10:43:15 2019 UTC (5 years, 6 months ago) by niro
File size: 833 byte(s)
Tue Mar 12 10:43:15 2019 UTC (5 years, 6 months ago) by niro
File size: 833 byte(s)
-linux-4.9.158
1 | diff --git a/Makefile b/Makefile |
2 | index 4eb7a17e18f1..2b8434aaeece 100644 |
3 | --- a/Makefile |
4 | +++ b/Makefile |
5 | @@ -1,6 +1,6 @@ |
6 | VERSION = 4 |
7 | PATCHLEVEL = 9 |
8 | -SUBLEVEL = 157 |
9 | +SUBLEVEL = 158 |
10 | EXTRAVERSION = |
11 | NAME = Roaring Lionus |
12 | |
13 | diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c |
14 | index 634bdbb23851..afdf4e3cafc2 100644 |
15 | --- a/fs/binfmt_script.c |
16 | +++ b/fs/binfmt_script.c |
17 | @@ -43,14 +43,10 @@ static int load_script(struct linux_binprm *bprm) |
18 | fput(bprm->file); |
19 | bprm->file = NULL; |
20 | |
21 | - for (cp = bprm->buf+2;; cp++) { |
22 | - if (cp >= bprm->buf + BINPRM_BUF_SIZE) |
23 | - return -ENOEXEC; |
24 | - if (!*cp || (*cp == '\n')) |
25 | - break; |
26 | - } |
27 | + bprm->buf[BINPRM_BUF_SIZE - 1] = '\0'; |
28 | + if ((cp = strchr(bprm->buf, '\n')) == NULL) |
29 | + cp = bprm->buf+BINPRM_BUF_SIZE-1; |
30 | *cp = '\0'; |
31 | - |
32 | while (cp > bprm->buf) { |
33 | cp--; |
34 | if ((*cp == ' ') || (*cp == '\t')) |