Package: src Version: 1:1.20.0-5 Severity: important Tags: patch upstream Busybox have the same issue with 2-component linux version code as lots of other utils had (discovered when linux 3.0 were released): it just segfaults when such a kernel is used.
This does not affect wheezy directly, since wheezy uses 3.2.0 kernel (with fake trailing zero to work around exactly this problem in various software), but yet it is important to get this fixed for wheezy, to let backported and self-compiled kernels to work. Especially since busybox is used in initramfs to boot the system. Patch to fix this issue is below. /mjt Subject: allow less-than-3-component kernel version number From: Michael Tokarev <m...@tls.msk.ru> Forwarded: no Busybox expects at least 3-component linux version number, and segfaults if less than 3 components are available. --- debian.orig/libbb/kernel_version.c +++ debian/libbb/kernel_version.c @@ -21,18 +21,19 @@ { struct utsname name; char *s; - int i, r; + int r; if (uname(&name) == -1) { bb_perror_msg("can't get system information"); return 0; } - s = name.release; - r = 0; - for (i = 0; i < 3; i++) { - r = r * 256 + atoi(strtok(s, ".")); - s = NULL; + r = atoi(strtok(name.release, ".")) * 256 * 256; + if ((s = strtok(NULL, ".")) != NULL) { + r |= atoi(s) * 256; + if ((s = strtok(NULL, ".")) != NULL) + r |= atoi(s); } + return r; } -- To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20120811105127.24829.54405.reportbug@gandalf.local