Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29aa0fb9 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

Merge 4.19.23 into android-4.19



Changes in 4.19.23
	Revert "exec: load_script: don't blindly truncate shebang string"
	Linux 4.19.23

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parents 0755dc93 67d52fae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 19
SUBLEVEL = 22
SUBLEVEL = 23
EXTRAVERSION =
NAME = "People's Front"

+3 −7
Original line number Diff line number Diff line
@@ -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'))