From fb94244ce396ae2de08f67757aa730ffec7567b0 Mon Sep 17 00:00:00 2001 From: midipix Date: Jun 29 2018 07:32:00 +0000 Subject: helper interfaces: slbt_dump_machine(): guard against a zero buflen parameter. --- diff --git a/src/helper/slbt_dump_machine.c b/src/helper/slbt_dump_machine.c index 1357509..3e0c65d 100644 --- a/src/helper/slbt_dump_machine.c +++ b/src/helper/slbt_dump_machine.c @@ -56,7 +56,7 @@ int slbt_dump_machine( char program[PATH_MAX]; /* setup */ - if (!machine || !--buflen) { + if (!machine || !buflen || !--buflen) { errno = EINVAL; return -1; }