From 5da8c8d5de75f1adc85faa26be9f627e3194bf14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Lind=C3=A9n?= Date: Mon, 5 Mar 2018 22:51:06 +0100 Subject: [PATCH] Don't throw away rtp packets from old Toxcore --- toxav/rtp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/toxav/rtp.c b/toxav/rtp.c index 575b1502..72b59354 100644 --- a/toxav/rtp.c +++ b/toxav/rtp.c @@ -467,7 +467,8 @@ static int handle_rtp_packet(Messenger *m, uint32_t friendnumber, const uint8_t return -1; } - if (header.offset_full >= header.data_length_full) { + if (header.offset_full >= header.data_length_full + && (header.offset_full != 0 || header.data_length_full != 0)) { LOGGER_ERROR(m->log, "Invalid video packet: frame offset (%u) >= full frame length (%u)", (unsigned)header.offset_full, (unsigned)header.data_length_full); return -1;