The documentation of av_fourcc_make_string states the passed in
buffer must be of at least the size of AV_FOURCC_MAX_STRING_SIZE
Also move the buffer into inner scope where it is used.
Fixes: CID 1632380
---
libavcodec/dnxuc_parser.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/dnxuc_parser.c b/libavcodec/dnxuc_parser.c
index 55d576345c..896758c794 100644
--- a/libavcodec/dnxuc_parser.c
+++ b/libavcodec/dnxuc_parser.c
@@ -68,7 +68,6 @@ static int dnxuc_parse(AVCodecParserContext *s,
const uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size)
{
- char fourcc_buf[5];
const int HEADER_SIZE = 37;
int icmp_offset = 0;
@@ -96,6 +95,8 @@ static int dnxuc_parse(AVCodecParserContext *s,
pc->nr_bytes = AV_RL32(buf+29+icmp_offset) - 8;
if (!avctx->codec_tag) {
+ char fourcc_buf[AV_FOURCC_MAX_STRING_SIZE];
+
av_fourcc_make_string(fourcc_buf, pc->fourcc_tag);
av_log(avctx, AV_LOG_INFO, "dnxuc_parser: '%s' %dx%d %dbpp %d\n",
fourcc_buf,
--
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".