---
 libavformat/rtmpproto.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 6044425..8c0ecb2 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -1038,7 +1038,11 @@ static int handle_invoke(URLContext *s, RTMPPacket *pkt)
     const uint8_t *data_end = pkt->data + pkt->data_size;
     int ret;
 
-    //TODO: check for the messages sent for wrong state?
+    if (pkt->data[0] != 0x02) {
+        av_log(s, AV_LOG_ERROR, "No string method found in invoke packet\n");
+        return AVERROR_INVALIDDATA;
+    }
+
     if (!memcmp(pkt->data, "\002\000\006_error", 9)) {
         uint8_t tmpstr[256];
 
-- 
1.7.11.1

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to