summaryrefslogtreecommitdiff
path: root/libavformat/rtpenc_h263.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rtpenc_h263.c')
-rw-r--r--libavformat/rtpenc_h263.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpenc_h263.c b/libavformat/rtpenc_h263.c
index 0ea492106b..84403a1069 100644
--- a/libavformat/rtpenc_h263.c
+++ b/libavformat/rtpenc_h263.c
@@ -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;