diff options
author | midipix <writeonce@midipix.org> | 2018-06-29 03:32:00 -0400 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2018-06-29 03:32:00 -0400 |
commit | fb94244ce396ae2de08f67757aa730ffec7567b0 (patch) | |
tree | f85be6290c7e8abdd80ff83bdcf09661dc0f2547 | |
parent | c5f4f43d7f8c3bcff11e576acb195c48ebb4689f (diff) | |
download | slibtool-fb94244ce396ae2de08f67757aa730ffec7567b0.tar.bz2 slibtool-fb94244ce396ae2de08f67757aa730ffec7567b0.tar.xz |
helper interfaces: slbt_dump_machine(): guard against a zero buflen parameter.
-rw-r--r-- | src/helper/slbt_dump_machine.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |