summaryrefslogtreecommitdiff
path: root/libavformat/rtmppkt.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2009-12-01 14:58:17 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2009-12-01 14:58:17 +0000
commit1ab21f1980080d697cd6f873083a5465d2d7cea6 (patch)
tree967a76aad3850699601444cf0d90c234301bb714 /libavformat/rtmppkt.c
parent00b6fa40c302190fb02c30f59cf42cce188e0ebd (diff)
7l trocadero: reading right into enum variable may cause unwanted effects, use
intermediate buffer for reading value instead in RTMP protocol handler. Originally committed as revision 20682 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/rtmppkt.c')
-rw-r--r--libavformat/rtmppkt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c
index 063a887282..8f9d71dc46 100644
--- a/libavformat/rtmppkt.c
+++ b/libavformat/rtmppkt.c
@@ -102,8 +102,9 @@ int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p,
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);