From a142c8613050cb09e3bb5130cd0ce26a2a5c0276 Mon Sep 17 00:00:00 2001 From: Sean Bruno Date: Wed, 28 Jan 2015 20:22:48 +0000 Subject: [PATCH] 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 --- usr.sbin/binmiscctl/binmiscctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/binmiscctl/binmiscctl.c b/usr.sbin/binmiscctl/binmiscctl.c index 436e761c418..44122eb47dc 100644 --- a/usr.sbin/binmiscctl/binmiscctl.c +++ b/usr.sbin/binmiscctl/binmiscctl.c @@ -363,7 +363,7 @@ add_cmd(__unused int argc, char *argv[], ximgact_binmisc_entry_t *xbe) usage("Error: Missing magic argument"); } - if (!xbe->xbe_interpreter) { + if (!strnlen(xbe->xbe_interpreter, IBE_INTERP_LEN_MAX)) { usage("Error: Missing 'interpreter' argument"); }