Commit f8ded343 authored by mstorsjo's avatar mstorsjo

Fix a crash in the H.263 RTP packetizer

If size == 1 and buf[0] == 0 and buf[1] == 0 (the first byte after the
buffer), it would set size = -1 and crash in the later memcpy.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22469 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 0dedfa05
......@@ -50,7 +50,7 @@ void ff_rtp_send_h263(AVFormatContext *s1, const uint8_t *buf1, int size)
while (size > 0) {
q = s->buf;
if ((buf1[0] == 0) && (buf1[1] == 0)) {
if (size >= 2 && (buf1[0] == 0) && (buf1[1] == 0)) {
*q++ = 0x04;
buf1 += 2;
size -= 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment