Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Sep 2018 14:49:27 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r338469 - stable/11/sys/kern
Message-ID:  <201809051449.w85EnRNv074160@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Wed Sep  5 14:49:26 2018
New Revision: 338469
URL: https://svnweb.freebsd.org/changeset/base/338469

Log:
  Revert an unintentional change from r338462.
  
  Reported by:	kib

Modified:
  stable/11/sys/kern/imgact_elf.c

Modified: stable/11/sys/kern/imgact_elf.c
==============================================================================
--- stable/11/sys/kern/imgact_elf.c	Wed Sep  5 13:59:36 2018	(r338468)
+++ stable/11/sys/kern/imgact_elf.c	Wed Sep  5 14:49:26 2018	(r338469)
@@ -839,8 +839,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i
 			break;
 		case PT_INTERP:
 			/* Path to interpreter */
-			if (phdr[i].p_filesz < 2 ||
-			    phdr[i].p_filesz > MAXPATHLEN) {
+			if (phdr[i].p_filesz > MAXPATHLEN) {
 				uprintf("Invalid PT_INTERP\n");
 				error = ENOEXEC;
 				goto ret;
@@ -871,11 +870,6 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *i
 			} else {
 				interp = __DECONST(char *, imgp->image_header) +
 				    phdr[i].p_offset;
-				if (interp[interp_name_len - 1] != '\0') {
-					uprintf("Invalid PT_INTERP\n");
-					error = ENOEXEC;
-					goto ret;
-				}
 			}
 			break;
 		case PT_GNU_STACK:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809051449.w85EnRNv074160>