diff options
author | sbruno <sbruno@FreeBSD.org> | 2015-01-28 20:22:48 +0000 |
---|---|---|
committer | sbruno <sbruno@FreeBSD.org> | 2015-01-28 20:22:48 +0000 |
commit | 0c952fe87fba8fb4904beb266e6ea958d66af440 (patch) | |
tree | 181efd38a55a699336dec505766d4bfd94429f54 | |
parent | b4f4496909b7cb04bac577eb178e95f3595d4197 (diff) | |
download | FreeBSD-src-0c952fe87fba8fb4904beb266e6ea958d66af440.zip FreeBSD-src-0c952fe87fba8fb4904beb266e6ea958d66af440.tar.gz |
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
-rw-r--r-- | usr.sbin/binmiscctl/binmiscctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/binmiscctl/binmiscctl.c b/usr.sbin/binmiscctl/binmiscctl.c index 436e761..44122eb 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"); } |