diff --git a/src/detect.c b/src/detect.c index 365391aef1..2150ffd59e 100644 --- a/src/detect.c +++ b/src/detect.c @@ -411,7 +411,8 @@ int PacketAlertCheck(Packet *p, uint32_t sid) int PacketAlertAppend(Packet *p, uint32_t gid, uint32_t sid, uint8_t rev, uint8_t prio, char *msg, char *class_msg) { - /* XXX overflow check? */ + if (p->alerts.cnt == PACKET_ALERT_MAX) + return 0; SCLogDebug("sid %"PRIu32"", sid);