Bug#460530: peekfd: segfaults if an fd argument is supplied

2008-06-09 Thread Craig Small
On Mon, Jun 09, 2008 at 01:21:29AM +0200, Quentin Godfroy wrote:
 It would be a *very good* idea to commit the patch.
Which patch?

-- 
Craig Small  GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
http://www.enc.com.au/ csmall at : enc.com.au
http://www.debian.org/  Debian GNU/Linux, software should be Free 



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#460530: peekfd: segfaults if an fd argument is supplied

2008-06-08 Thread Quentin Godfroy
It would be a *very good* idea to commit the patch.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#460530: peekfd: segfaults if an fd argument is supplied

2008-01-13 Thread Urs Ganse
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.0 +0100
+++ psmisc-22.6/src/peekfd.c2008-01-13 12:51:26.0 +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);