diff options
author | Olof Sivertsson <osivertsson@gmail.com> | 2016-09-08 08:32:43 +0200 |
---|---|---|
committer | Craig Small <csmall@enc.com.au> | 2016-09-11 09:58:55 +1000 |
commit | 95ed10ff438ee1c850bbd235f1bd98e6113ccfe6 (patch) | |
tree | 4d3fb975f29aa033373c601789912eab882be713 /testsuite/kill.test | |
parent | e02d9f554d614843108a2148a51b331e65c09169 (diff) | |
download | procps-ng-95ed10ff438ee1c850bbd235f1bd98e6113ccfe6.tar.gz |
kill: Fix free() with bad pointer on SIG-prefixed signal-name
kill -l SIGHUP (or any other signal-name prefixed with "SIG")
would cause free() to be called with a bad pointer instead of
a pointer to what was allocated. Fix this and add test-case.
Diffstat (limited to 'testsuite/kill.test')
-rw-r--r-- | testsuite/kill.test/kill.exp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/kill.test/kill.exp b/testsuite/kill.test/kill.exp index 1668ac4..211395c 100644 --- a/testsuite/kill.test/kill.exp +++ b/testsuite/kill.test/kill.exp @@ -24,6 +24,10 @@ set test "kill convert signal name to number" spawn $kill -lHUP expect_pass "$test" "^1\\s*" +set test "kill convert SIG-prefixed signal name to number" +spawn $kill -lSIGHUP +expect_pass "$test" "^1\\s*$" + set test "kill convert signal number to name" spawn $kill -l 1 expect_pass "$test" "^HUP\\s*" |