Package: mmv Version: 1.01b-12 Followup-For: Bug #179337 Dear mmv maintainers, I'm often relying on mmv so I tracked that down in the sources. I experienced a segfault where a target directory didn't exist; the debugger showed that it occurred in badname() called in line 1265 of mmv.c. The point is that *pnto gets assigned an out-of-bounds pointer in checkto() called just before; It turns out that this is because the automatic variable FILEINFO *fdel is not initialized in checkto() and the missing target directory prevents that it it ever assigned a value before it is checked against NULL in line 1378.
Possibly the program's author has made the assumption of NULL-initialized automatic variables in other places as well; the simple fix is to use FILEINFO *fdel=NULL explicitly (line 1322 of the original mmv.c). I attach a context patch, which is against the 'protoize'd version of mmv.c; Currently gcc refuses the -traditional keyword and anyway I'd urgently plead for using the 'protoize'd source only (K&R sources are hard to debug...). Best regards, Bernd -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.11.5 Locale: LANG=C, LC_CTYPE=de_DE (charmap=ISO-8859-1) Versions of packages mmv depends on: ii libc6 2.3.2.ds1-20 GNU C Library: Shared libraries an -- no debconf information -- PATCH: *** mmv.c 2005/04/15 15:10:48 1.2 --- mmv.c 2005/04/15 15:28:58 1.3 *************** *** 1280,1286 **** { char tpath[MAXPATH + 1]; char *pathend; ! FILEINFO *fdel; int hlen, tlen; if (op & DIRMOVE) { --- 1280,1286 ---- { char tpath[MAXPATH + 1]; char *pathend; ! FILEINFO *fdel=NULL; int hlen, tlen; if (op & DIRMOVE) { -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]