[FFmpeg-cvslog] r20682 - trunk/libavformat/rtmppkt.c

kostya subversion
Tue Dec 1 15:58:17 CET 2009


Author: kostya
Date: Tue Dec  1 15:58:17 2009
New Revision: 20682

Log:
7l trocadero: reading right into enum variable may cause unwanted effects, use
intermediate buffer for reading value instead in RTMP protocol handler.

Modified:
   trunk/libavformat/rtmppkt.c

Modified: trunk/libavformat/rtmppkt.c
==============================================================================
--- trunk/libavformat/rtmppkt.c	Tue Dec  1 14:17:10 2009	(r20681)
+++ trunk/libavformat/rtmppkt.c	Tue Dec  1 15:58:17 2009	(r20682)
@@ -102,8 +102,9 @@ int ff_rtmp_packet_read(URLContext *h, R
             if (url_read_complete(h, buf, 3) != 3)
                 return AVERROR(EIO);
             data_size = AV_RB24(buf);
-            if (url_read_complete(h, &type, 1) != 1)
+            if (url_read_complete(h, buf, 1) != 1)
                 return AVERROR(EIO);
+            type = buf[0];
             if (hdr == RTMP_PS_TWELVEBYTES) {
                 if (url_read_complete(h, buf, 4) != 4)
                     return AVERROR(EIO);



More information about the ffmpeg-cvslog mailing list