Package: module-init-tools
Version: 3.3-pre11-1
Severity: important
Hi,
Insmod segfaults when not called with at least a slash in the path:
# insmod /lib/modules/2.6.21\=topinambour/kernel/drivers/input/misc/pcspkr.ko
Segmentation fault (core dumped)
After rebuilding module-init-tools with nostrip, gdb says:
Core was generated by `insmod
/lib/modules/2.6.21=topinambour/kernel/drivers/input/misc/pcspkr.ko'.
Program terminated with signal 11, Segmentation fault.
#0 0xb7ed1f67 in strstr () from /lib/libc.so.6
(gdb) where
#0 0xb7ed1f67 in strstr () from /lib/libc.so.6
#1 0x08048c1f in main (argc=2, argv=0xbfb0c904) at ../insmod.c:119
The problem comes from this code:
(p = strrchr(argv[0], '/')) ? p++ : argv[0];
if (strstr(p, "insmod.static"))
try_old_version("insmod.static", argv);
else
try_old_version("insmod", argv);
Apart from being kind of obsfucated for no reason, the first line is wrong.
It looks like "p=" is missing at the end. The following patch fixes the
problem for me.
thanks,
Brice
---
insmod.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: module-init-tools-3.3-pre11/insmod.c
===================================================================
--- module-init-tools-3.3-pre11.orig/insmod.c 2007-06-12 20:34:54.000000000
+0200
+++ module-init-tools-3.3-pre11/insmod.c 2007-06-12 20:35:33.000000000
+0200
@@ -115,7 +115,10 @@
exit(1);
}
- (p = strrchr(argv[0], '/')) ? p++ : argv[0];
+ if ((p = strrchr(argv[0], '/')) != NULL)
+ p++;
+ else
+ p = argv[0];
if (strstr(p, "insmod.static"))
try_old_version("insmod.static", argv);
else
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1,
'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.22-rc4=panpancucul
Locale: LANG=C, [EMAIL PROTECTED] (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash
Versions of packages module-init-tools depends on:
ii libc6 2.5-9+b1 GNU C Library: Shared libraries
ii lsb-base 3.1-23.1 Linux Standard Base 3.1 init scrip
module-init-tools recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]