svn commit: r277853 - head/usr.sbin/binmiscctl

Sean Bruno sbruno at FreeBSD.org
Wed Jan 28 20:22:49 UTC 2015


Author: sbruno
Date: Wed Jan 28 20:22:48 2015
New Revision: 277853
URL: https://svnweb.freebsd.org/changeset/base/277853

Log:
  Check for invalid length or more than max length for the interpreter, instead
  of the validity of the string pointer holding the interpreter.
  
  Submitted by:	sson
  Reviewed by:	dim
  MFC after:	3 days

Modified:
  head/usr.sbin/binmiscctl/binmiscctl.c

Modified: head/usr.sbin/binmiscctl/binmiscctl.c
==============================================================================
--- head/usr.sbin/binmiscctl/binmiscctl.c	Wed Jan 28 20:01:21 2015	(r277852)
+++ head/usr.sbin/binmiscctl/binmiscctl.c	Wed Jan 28 20:22:48 2015	(r277853)
@@ -363,7 +363,7 @@ add_cmd(__unused int argc, char *argv[],
 		usage("Error: Missing magic argument");
 	}
 
-	if (!xbe->xbe_interpreter) {
+	if (!strnlen(xbe->xbe_interpreter, IBE_INTERP_LEN_MAX)) {
 		usage("Error: Missing 'interpreter' argument");
 	}
 


More information about the svn-src-all mailing list