reputation: declare max value as constant

pull/3746/head
Giuseppe Longo 6 years ago committed by Victor Julien
parent f7a41412d6
commit 6b2a5ef21e

@ -311,7 +311,7 @@ static int SRepSplitLine(SRepCIDRTree *cidr_ctx, char *line, Address *ip, uint8_
}
int v = atoi(ptrs[2]);
if (v < 0 || v > 127) {
if (v < 0 || v > SREP_MAX_VAL) {
return -1;
}

@ -1,4 +1,4 @@
/* Copyright (C) 2007-2010 Open Information Security Foundation
/* Copyright (C) 2007-2019 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
@ -29,6 +29,7 @@
#include "host.h"
#define SREP_MAX_CATS 60
#define SREP_MAX_VAL 127
typedef struct SRepCIDRTree_ {
SCRadixTree *srepIPV4_tree[SREP_MAX_CATS];

Loading…
Cancel
Save