mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-13 13:26:01 +03:00
Adjust position of memset from 2890
This commit is contained in:
parent
09568351d9
commit
b9eb39af83
2
CHANGES
2
CHANGES
@ -1,5 +1,7 @@
|
|||||||
v3.x.y - YYYY-MMM-DD (to be released)
|
v3.x.y - YYYY-MMM-DD (to be released)
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
- Adjust position of memset from 2890
|
||||||
|
[Issue #2891 - @mirkodziadzka-avi, @martinhsv]
|
||||||
- Add test: empty lines in ipMatchFromFile test
|
- Add test: empty lines in ipMatchFromFile test
|
||||||
[Issue #2846 - @tomsommer]
|
[Issue #2846 - @tomsommer]
|
||||||
|
|
||||||
|
@ -258,11 +258,13 @@ int InsertNetmask(TreeNode *node, TreeNode *parent, TreeNode *new_node,
|
|||||||
}
|
}
|
||||||
|
|
||||||
node->count++;
|
node->count++;
|
||||||
|
|
||||||
node->netmasks = reinterpret_cast<unsigned char *>(malloc(node->count * sizeof(unsigned char)));
|
node->netmasks = reinterpret_cast<unsigned char *>(malloc(node->count * sizeof(unsigned char)));
|
||||||
|
if(node->netmasks == NULL) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
memset(node->netmasks, 0, (node->count * sizeof(unsigned char)));
|
memset(node->netmasks, 0, (node->count * sizeof(unsigned char)));
|
||||||
|
|
||||||
if(node->netmasks == NULL)
|
|
||||||
return 0;
|
|
||||||
if ((node->count-1) == 0) {
|
if ((node->count-1) == 0) {
|
||||||
node->netmasks[0] = netmask;
|
node->netmasks[0] = netmask;
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user