]> granicus.if.org Git - procps-ng/commitdiff
tload: Call longjmp() 1 instead of 0.
authorQualys Security Advisory <qsa@qualys.com>
Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)
committerCraig Small <csmall@enc.com.au>
Fri, 18 May 2018 21:32:21 +0000 (07:32 +1000)
Do it explicitly instead of the implicit "longjmp() cannot cause 0 to be
returned. If longjmp() is invoked with a second argument of 0, 1 will be
returned instead."

tload.c

diff --git a/tload.c b/tload.c
index a45f8c9bfa67f6d4bb40ea7313b407e6ea184e48..92aae3e4a131ea7d4d89f3a76acee3550dab882d 100644 (file)
--- a/tload.c
+++ b/tload.c
@@ -81,7 +81,7 @@ static void setsize(int i)
        memset(screen, ' ', scr_size - 1);
        *(screen + scr_size - 2) = '\0';
        if (i)
-               longjmp(jb, 0);
+               longjmp(jb, 1);
 }
 
 static void __attribute__ ((__noreturn__)) usage(FILE * out)