diff --git a/src/detect-ttl.c b/src/detect-ttl.c index 89f890bda9..a83451bbc7 100644 --- a/src/detect-ttl.c +++ b/src/detect-ttl.c @@ -219,8 +219,11 @@ DetectTtlData *DetectTtlParse (char *ttlstr) { ttld->ttl1 = (uint8_t) atoi(arg1); ttld->ttl2 = (uint8_t) atoi(arg3); - SCLogDebug("ttl is %"PRIu8" and %"PRIu8"",ttld->ttl1, ttld->ttl2); - + SCLogDebug("ttl is %"PRIu8" to %"PRIu8"",ttld->ttl1, ttld->ttl2); + if (ttld->ttl1 >= ttld->ttl2) { + SCLogError(SC_ERR_INVALID_SIGNATURE, "Invalid ttl range. "); + goto error; + } break; default: ttld->mode = DETECT_TTL_EQ;