Commit d8a023cb authored by kostya's avatar kostya

7l trocadero: reading right into enum variable may cause unwanted effects, use

intermediate buffer for reading value instead in RTMP protocol handler.



git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20682 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 45c9bdc8
...@@ -102,8 +102,9 @@ int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p, ...@@ -102,8 +102,9 @@ int ff_rtmp_packet_read(URLContext *h, RTMPPacket *p,
if (url_read_complete(h, buf, 3) != 3) if (url_read_complete(h, buf, 3) != 3)
return AVERROR(EIO); return AVERROR(EIO);
data_size = AV_RB24(buf); data_size = AV_RB24(buf);
if (url_read_complete(h, &type, 1) != 1) if (url_read_complete(h, buf, 1) != 1)
return AVERROR(EIO); return AVERROR(EIO);
type = buf[0];
if (hdr == RTMP_PS_TWELVEBYTES) { if (hdr == RTMP_PS_TWELVEBYTES) {
if (url_read_complete(h, buf, 4) != 4) if (url_read_complete(h, buf, 4) != 4)
return AVERROR(EIO); return AVERROR(EIO);
......
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