Project

General

Profile

Bug #25 ยป 0001-double-port-address-negation-is-parsed-incorrectly.patch

Anoop Saldanha, 12/27/2009 11:23 PM

View differences:

src/detect-engine-port.c
2454 2454
    return PortTestMatchRealWrp(sig, 1);
2455 2455
}
2456 2456

  
2457
static int PortTestMatchDoubleNegation(void)
2458
{
2459
    int result = 0;
2460
    DetectPort *head = NULL, *nhead = NULL;
2461

  
2462
    if (DetectPortParseDo(&head, &nhead, "![!80]", 0) == -1)
2463
        return result;
2464

  
2465
    result = (head != NULL);
2466
    result = (nhead == NULL);
2467

  
2468
    return result;
2469
}
2457 2470

  
2458 2471
#endif /* UNITTESTS */
2459 2472

  
......
2499 2512
    UtRegisterTest("PortTestMatchReal18", PortTestMatchReal18, 1);
2500 2513
    UtRegisterTest("PortTestMatchReal19 (expected to fail, see bug #8)",
2501 2514
                   PortTestMatchReal19, 1);
2515
    UtRegisterTest("PortTestMatchDoubleNegation", PortTestMatchDoubleNegation, 1);
2516

  
2517

  
2502 2518
#endif /* UNITTESTS */
2503 2519
}
2504 2520

  
    (1-1/1)