]> granicus.if.org Git - procps-ng/commit
top: fix a segfault when -p switch specified invalid pid
authorJim Warner <james.warner@comcast.net>
Wed, 11 Apr 2012 09:11:12 +0000 (04:11 -0500)
committerCraig Small <csmall@enc.com.au>
Sun, 15 Apr 2012 00:25:05 +0000 (10:25 +1000)
commitcd253e0dc6ee899cc3ec74c72dc032b7c89f65b3
treea852d3948d132ccdcf29f560cd516e23a6760a00
parentb079d130d72da94c22aefd338853b4bc2eca554d
top: fix a segfault when -p switch specified invalid pid

In attempting to keep at least one task visible when
scrolling vertically, a negative task index would be
produced when pid monitoring was in effect and no
matching pid was found.

Since there were already other conditions where no
task might displayed, the faulty source line has been
removed.

Bug-Debian: http://bugs.debian.org/668335

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c