From 1f3f944f4ec0696b18c32d07b005634dd42e6e75 Mon Sep 17 00:00:00 2001 From: Alexander Podrezenko <al@capt.su> Date: Mon, 16 Oct 2023 08:55:56 +0000 Subject: [PATCH] Check for possible NULL pointer --- src/rist-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rist-common.c b/src/rist-common.c index 63abcf7e..847f6c6c 100755 --- a/src/rist-common.c +++ b/src/rist-common.c @@ -2563,7 +2563,7 @@ protocol_bypass: /* Double check for a valid rtp header */ if ((rtp->flags & 0xc0) != 0x80) { - if (now > (p->log_repeat_timer + RIST_LOG_QUIESCE_TIMER)) { + if (p && now > (p->log_repeat_timer + RIST_LOG_QUIESCE_TIMER)) { rist_log_priv(get_cctx(peer), RIST_LOG_ERROR, "Malformed packet, rtp flag value is %02x instead of 0x80.\n", rtp->flags); p->log_repeat_timer = now; -- GitLab