Fix potential crash in address parsing code.

remotes/origin/master-1.0.x
Victor Julien 15 years ago
parent a2480bc07b
commit 783c781301

@ -389,7 +389,7 @@ int DetectAddressInsert(DetectEngineCtx *de_ctx, DetectAddressHead *gh,
DetectAddress *new)
{
DetectAddress *head = NULL;
DetectPort *port = new->port;
DetectPort *port = NULL;
DetectAddress *cur = NULL;
DetectAddress *c = NULL;
int r = 0;
@ -397,6 +397,8 @@ int DetectAddressInsert(DetectEngineCtx *de_ctx, DetectAddressHead *gh,
if (new == NULL)
return 0;
port = new->port;
BUG_ON(new->ip.family == 0 && !(new->flags & ADDRESS_FLAG_ANY));
/* get our head ptr based on the address we want to insert */

Loading…
Cancel
Save