chipitsine reported in github issue #1872 that in function hash_anon and
hash_ipanon, index_hash can be equal to NB_L_HASH_WORD and can reach an
inexisting line table, the table is initialized hash_word[NB_L_HASH_WORD][20];
so hash_word[NB_L_HASH_WORD] doesn't exist.
No backport needed, except if anonymization mechanism is backported.
const char *hash_anon(uint32_t scramble, const char *string2hash, const char *prefix, const char *suffix)
{
index_hash++;
- if (index_hash > NB_L_HASH_WORD)
+ if (index_hash == NB_L_HASH_WORD)
index_hash = 0;
/* don't hash empty strings */
int port;
index_hash++;
- if (index_hash > NB_L_HASH_WORD) {
+ if (index_hash == NB_L_HASH_WORD) {
index_hash = 0;
}