# HG changeset patch # User kostya # Date 1259679497 0 # Node ID f042e114451fb80394d6a0d416697e9cd0c0b7e0 # Parent e92aec1db0b9368044dfb05e85adbea40abf40ac 7l trocadero: reading right into enum variable may cause unwanted effects, use intermediate buffer for reading value instead in RTMP protocol handler. diff -r e92aec1db0b9 -r f042e114451f rtmppkt.c --- a/rtmppkt.c Tue Dec 01 13:17:10 2009 +0000 +++ b/rtmppkt.c Tue Dec 01 14:58:17 2009 +0000 @@ -102,8 +102,9 @@ 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);