mirror of
https://github.com/Fishwaldo/build.git
synced 2025-03-28 09:41:41 +00:00
35 lines
870 B
Diff
35 lines
870 B
Diff
diff --git a/Makefile b/Makefile
|
|
index 8cfcb01fcd7b..3dcf3f2363c1 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -1,7 +1,7 @@
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
VERSION = 4
|
|
PATCHLEVEL = 19
|
|
-SUBLEVEL = 22
|
|
+SUBLEVEL = 23
|
|
EXTRAVERSION =
|
|
NAME = "People's Front"
|
|
|
|
diff --git a/fs/binfmt_script.c b/fs/binfmt_script.c
|
|
index d0078cbb718b..7cde3f46ad26 100644
|
|
--- a/fs/binfmt_script.c
|
|
+++ b/fs/binfmt_script.c
|
|
@@ -42,14 +42,10 @@ static int load_script(struct linux_binprm *bprm)
|
|
fput(bprm->file);
|
|
bprm->file = NULL;
|
|
|
|
- for (cp = bprm->buf+2;; cp++) {
|
|
- if (cp >= bprm->buf + BINPRM_BUF_SIZE)
|
|
- return -ENOEXEC;
|
|
- if (!*cp || (*cp == '\n'))
|
|
- break;
|
|
- }
|
|
+ bprm->buf[BINPRM_BUF_SIZE - 1] = '\0';
|
|
+ if ((cp = strchr(bprm->buf, '\n')) == NULL)
|
|
+ cp = bprm->buf+BINPRM_BUF_SIZE-1;
|
|
*cp = '\0';
|
|
-
|
|
while (cp > bprm->buf) {
|
|
cp--;
|
|
if ((*cp == ' ') || (*cp == '\t'))
|