Package: busybox-cvs Version: 0.60.99.cvs20030426-9 (not installed) Severity: important Tags: upstream patch
Hi, check_free_memory() is init/init.c is broken. While I really think it should be more careful about overflows, I've tried to follow upstream's will in the patch. Important severity because it makes d-i boot fail on s390x (I know it is not a supported arch but I guess you'll find the problem on other archs) --- busybox-cvs-0.60.99.cvs20030426.orig/init/init.c +++ busybox-cvs-0.60.99.cvs20030426/init/init.c @@ -335,7 +335,8 @@ } result = (info.totalram >> s) + (info.totalswap >> s); result = result * u; - if (result < 0) + /* checking for int/unsigned overflows */ + if (result > INT_MAX || result < u) result = INT_MAX; return result; } The current code was really broken, result is declared as unsigned ... IMHO, result should be an unsigned long long to avoid overflows and numerous checks. But the patched code should work for now assuming the first operation does not trigger an overflow... HTH. Guillaume. -- System Information: Debian Release: testing/unstable Architecture: i386 Kernel: Linux belette 2.4.20 #17 lun jun 16 14:50:16 EDT 2003 i686 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] -- Guillaume Morin <[EMAIL PROTECTED]> We're a couple when our bodies double (Placebo) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]