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:
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to