diff options
author | Hagen Paul Pfeifer <hagen@jauu.net> | 2009-02-20 10:48:06 +0100 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2009-02-20 10:48:06 +0100 |
commit | af07d241dc76f0a52c7ff04df3a3970020fe6157 (patch) | |
tree | c1461cfc8c0ab342996efd6982e9b376dea62f54 /net/netfilter/xt_hashlimit.c | |
parent | e478075c6f07a383c378fb400edc1a7407a941b0 (diff) |
netfilter: fix hardcoded size assumptions
get_random_bytes() is sometimes called with a hard coded size assumption
of an integer. This could not be true for next centuries. This patch
replace it with a compile time statement.
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/xt_hashlimit.c')
-rw-r--r-- | net/netfilter/xt_hashlimit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index f97fded024c..2482055e1c5 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c @@ -149,7 +149,7 @@ dsthash_alloc_init(struct xt_hashlimit_htable *ht, /* initialize hash with random val at the time we allocate * the first hashtable entry */ if (!ht->rnd_initialized) { - get_random_bytes(&ht->rnd, 4); + get_random_bytes(&ht->rnd, sizeof(ht->rnd)); ht->rnd_initialized = 1; } |