aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/rtp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/main/rtp.c b/main/rtp.c
index 8a51050b9..bb73d253f 100644
--- a/main/rtp.c
+++ b/main/rtp.c
@@ -1840,6 +1840,9 @@ struct ast_frame *ast_rtp_read(struct ast_rtp *rtp)
rtp->f.subclass = AST_FORMAT_T140;
header_end = memchr(data, ((*data) & 0x7f), rtp->f.datalen);
+ if (header_end == NULL) {
+ return &ast_null_frame;
+ }
header_end++;
header_length = header_end - data;