Package: psmisc
Version: 22.6-1
Severity: normal
Tags: patch

peekfd's option parsing code contains an off-by-one error, causing a
segfault if called with an fd argument.

//urs

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (600, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.21.5
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages psmisc depends on:
ii  libc6                     2.7-5          GNU C Library: Shared libraries
ii  libncurses5               5.6+20071124-1 Shared libraries for terminal hand

psmisc recommends no packages.

-- no debconf information
--- psmisc-22.6/src/peekfd-orig.c       2008-01-13 13:01:11.000000000 +0100
+++ psmisc-22.6/src/peekfd.c    2008-01-13 12:51:26.000000000 +0100
@@ -178,7 +178,7 @@
       numfds = argc - optind;
       fds = malloc(sizeof(int) * numfds);
          for (i = 0; i < numfds; i++)
-               fds[i] = atoi(argv[optind + 1 + i]);
+               fds[i] = atoi(argv[optind + i]);
     }
 
        attach(target_pid);

Reply via email to