They are not Null terminated.
---
libavformat/rtmppkt.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavformat/rtmppkt.c b/libavformat/rtmppkt.c
index 4c8afea..643d80f 100644
--- a/libavformat/rtmppkt.c
+++ b/libavformat/rtmppkt.c
@@ -508,12 +508,14 @@ static void amf_tag_contents(void *ctx, const uint8_t
*data,
for (;;) {
int t;
size = bytestream_get_be16(&data);
- av_strlcpy(buf, data, FFMIN(sizeof(buf), size + 1));
+ size = FFMIN(size, sizeof(buf) - 1);
if (!size) {
av_log(ctx, AV_LOG_DEBUG, " }\n");
data++;
break;
}
+ memcpy(buf, data, size);
+ buf[size] = 0;
if (size >= data_end - data)
return;
data += size;
--
1.8.3.2
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel