svn commit: trunk/busybox/util-linux

vda at busybox.net vda at busybox.net
Mon Nov 5 19:33:38 UTC 2007


Author: vda
Date: 2007-11-05 11:33:38 -0800 (Mon, 05 Nov 2007)
New Revision: 20368

Log:
swaponoff: prevent arithmetic overflow (spotted by Paul Fox <pgf at brightstareng.com>)



Modified:
   trunk/busybox/util-linux/swaponoff.c


Changeset:
Modified: trunk/busybox/util-linux/swaponoff.c
===================================================================
--- trunk/busybox/util-linux/swaponoff.c	2007-11-05 19:31:01 UTC (rev 20367)
+++ trunk/busybox/util-linux/swaponoff.c	2007-11-05 19:33:38 UTC (rev 20368)
@@ -21,7 +21,7 @@
 #if ENABLE_DESKTOP
 	/* test for holes */
 	if (S_ISREG(st.st_mode))
-		if (st.st_blocks * 512 < st.st_size)
+		if (st.st_blocks * (off_t)512 < st.st_size)
 			bb_error_msg("warning: swap file has holes");
 #endif
 




More information about the busybox-cvs mailing list