signature: error for rules with illegal port

Fixes #2080
pull/3935/head
Philippe Antoine 7 years ago committed by Victor Julien
parent 248f9c66cf
commit 4a74e9edcc

@ -1465,7 +1465,10 @@ error:
*/
int DetectPortIsValidRange(char *port)
{
if(atoi(port) >= 0 && atoi(port) <= 65535)
char *end;
long r = strtol(port, &end, 10);
if(*end == 0 && r >= 0 && r <= 65535)
return 1;
else
return 0;

Loading…
Cancel
Save