diff options
author | JP Abgrall <jpa@google.com> | 2011-05-18 20:26:14 -0700 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2011-05-20 16:08:27 +0200 |
commit | 2305d5fb42fc059f38fc1bdf53411dbeecdb310b (patch) | |
tree | 533581021a3f92c391af249cb28a59ed29ea51c2 /xtables.c | |
parent | 67db7615580f5c3490a39310f5adcb4e767ea6a8 (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')
-rw-r--r-- | xtables.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |