summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2018-06-29 03:32:00 -0400
committermidipix <writeonce@midipix.org>2018-06-29 03:32:00 -0400
commitfb94244ce396ae2de08f67757aa730ffec7567b0 (patch)
treef85be6290c7e8abdd80ff83bdcf09661dc0f2547 /src
parentc5f4f43d7f8c3bcff11e576acb195c48ebb4689f (diff)
downloadslibtool-fb94244ce396ae2de08f67757aa730ffec7567b0.tar.bz2
slibtool-fb94244ce396ae2de08f67757aa730ffec7567b0.tar.xz
helper interfaces: slbt_dump_machine(): guard against a zero buflen parameter.
Diffstat (limited to 'src')
-rw-r--r--src/helper/slbt_dump_machine.c2
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;
}