mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-10-01 03:57:47 +03:00
Adjust position of memset from 2890
This commit is contained in:
@@ -258,11 +258,13 @@ int InsertNetmask(TreeNode *node, TreeNode *parent, TreeNode *new_node,
|
||||
}
|
||||
|
||||
node->count++;
|
||||
|
||||
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)));
|
||||
|
||||
if(node->netmasks == NULL)
|
||||
return 0;
|
||||
if ((node->count-1) == 0) {
|
||||
node->netmasks[0] = netmask;
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user