Date: Wed, 28 Jan 2015 20:22:48 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277853 - head/usr.sbin/binmiscctl Message-ID: <201501282022.t0SKMm0C035502@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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"); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201501282022.t0SKMm0C035502>