path: root/xtables.c
diff options
authorJP Abgrall <>2011-05-18 20:26:14 -0700
committerJan Engelhardt <>2011-05-20 16:08:27 +0200
commit2305d5fb42fc059f38fc1bdf53411dbeecdb310b (patch)
tree533581021a3f92c391af249cb28a59ed29ea51c2 /xtables.c
parent67db7615580f5c3490a39310f5adcb4e767ea6a8 (diff)
libxt_quota: make sure uint64 is not truncated
The xtables_strtoul() would cram a long long into a long. The parse_int would try to cram a UINT64 into a long.
Diffstat (limited to 'xtables.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/xtables.c b/xtables.c
index f10cdb70..3c9a13f4 100644
--- a/xtables.c
+++ b/xtables.c
@@ -426,7 +426,7 @@ int xtables_load_ko(const char *modprobe, bool quiet)
* Returns true/false whether number was accepted. On failure, *value has
* undefined contents.
-bool xtables_strtoul(const char *s, char **end, unsigned long *value,
+bool xtables_strtoul(const char *s, char **end, unsigned long long *value,
unsigned long min, unsigned long max)
unsigned long v;
@@ -454,7 +454,7 @@ bool xtables_strtoul(const char *s, char **end, unsigned long *value,
bool xtables_strtoui(const char *s, char **end, unsigned int *value,
unsigned int min, unsigned int max)
- unsigned long v;
+ unsigned long long v;
bool ret;
ret = xtables_strtoul(s, end, &v, min, max);