Skip to content

Commit

Permalink
Only check full rtp offset if RTP_LARGE_FRAME is set
Browse files Browse the repository at this point in the history
  • Loading branch information
robinlinden authored and iphydf committed Jun 16, 2018
1 parent adca701 commit 8e76c5a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions toxav/rtp.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,8 +468,7 @@ static int handle_rtp_packet(Messenger *m, uint32_t friendnumber, const uint8_t
return -1;
}

if (header.offset_full >= header.data_length_full
&& (header.offset_full != 0 || header.data_length_full != 0)) {
if (header.flags & RTP_LARGE_FRAME && header.offset_full >= header.data_length_full) {
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;
Expand Down

0 comments on commit 8e76c5a

Please sign in to comment.