projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
15c3885
)
swaponoff: prevent arithmetic overflow (spotted by Paul Fox <pgf@brightstareng.com>)
author
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 5 Nov 2007 19:33:38 +0000
(19:33 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 5 Nov 2007 19:33:38 +0000
(19:33 -0000)
util-linux/swaponoff.c
patch
|
blob
|
history
diff --git
a/util-linux/swaponoff.c
b/util-linux/swaponoff.c
index 6858d2619c784d849bf77e940ff194681faae063..48f6f4e0bf979438ca7b9bd5d3cfbc2feeb18eaf 100644
(file)
--- a/
util-linux/swaponoff.c
+++ b/
util-linux/swaponoff.c
@@
-21,7
+21,7
@@
static int swap_enable_disable(char *device)
#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