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
This commit is contained in:
Sean Bruno 2015-01-28 20:22:48 +00:00
parent 272a972b88
commit a142c86130

View File

@ -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");
}