mirror of https://github.com/OISF/suricata
cybersecurityidsintrusion-detection-systemintrusion-prevention-systemipsnetwork-monitornetwork-monitoringnsmsecuritysuricatathreat-hunting
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Fix issue detected byCoverity: *** CID 1197756: Bad bit shift operation (BAD_SHIFT) /src/util-rohash.c: 74 in ROHashInit() 68 } 69 if (hash_bits < 4 || hash_bits > 32) { 70 SCLogError(SC_ERR_HASH_TABLE_INIT, "invalid hash_bits setting, valid range is 4-32"); 71 return NULL; 72 } 73 >>> CID 1197756: Bad bit shift operation (BAD_SHIFT) >>> In expression "1U << hash_bits", left shifting by more than 31 bits has undefined behavior. The shift amount, "hash_bits", is as much as 32. 74 uint32_t size = hashsize(hash_bits) * sizeof(ROHashTableOffsets); 75 76 ROHashTable *table = SCMalloc(sizeof(ROHashTable) + size); 77 if (unlikely(table == NULL)) { 78 SCLogError(SC_ERR_HASH_TABLE_INIT, "failed to alloc memory"); 79 return NULL; This was only a potential issue as ROHashInit was only called with hash_bits 16 in the code. Bug #1170. |
11 years ago | |
---|---|---|
benches | ||
contrib | 12 years ago | |
doc | 13 years ago | |
m4 | ||
qa | 11 years ago | |
rules | 11 years ago | |
scripts | 13 years ago | |
src | 11 years ago | |
.gitignore | 12 years ago | |
COPYING | ||
ChangeLog | 12 years ago | |
LICENSE | ||
Makefile.am | 12 years ago | |
Makefile.cvs | ||
acsite.m4 | ||
autogen.sh | 13 years ago | |
classification.config | 16 years ago | |
config.rpath | 12 years ago | |
configure.ac | 12 years ago | |
doxygen.cfg | 12 years ago | |
reference.config | 14 years ago | |
suricata.yaml.in | 11 years ago | |
threshold.config | 13 years ago |