Signed-off-by: Marton Balint <[email protected]>
---
libavcodec/assdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/assdec.c b/libavcodec/assdec.c
index f0b1069cd2..655fc1365c 100644
--- a/libavcodec/assdec.c
+++ b/libavcodec/assdec.c
@@ -54,7 +54,7 @@ static int ass_decode_frame(AVCodecContext *avctx, void
*data, int *got_sub_ptr,
return AVERROR(ENOMEM);
sub->num_rects = 1;
sub->rects[0]->type = SUBTITLE_ASS;
- sub->rects[0]->ass = av_strdup(avpkt->data);
+ sub->rects[0]->ass = av_strndup(avpkt->data, avpkt->size);
if (!sub->rects[0]->ass)
return AVERROR(ENOMEM);
*got_sub_ptr = 1;
--
2.26.2
_______________________________________________
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".