diff options
author | Zhao Zhili <[email protected]> | 2024-10-04 01:30:57 +0800 |
---|---|---|
committer | Zhao Zhili <[email protected]> | 2024-10-04 15:43:57 +0800 |
commit | eff9ed7bff45998ea370e3d6f627529ad47e2e74 (patch) | |
tree | a9dcfcb1532347237c99135dcdcfe45fb049c0f5 | |
parent | 556c767786e9e3c072f7666d60a68a31a3400438 (diff) |
avcodec/mediacodecenc: Fix access of uninitialized value
When crop is skipped, av_strlcatf will access `str` which isn't
initialized properly.
Signed-off-by: Zhao Zhili <[email protected]>
-rw-r--r-- | libavcodec/mediacodecenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c index 6ca3968a24..e76ea81236 100644 --- a/libavcodec/mediacodecenc.c +++ b/libavcodec/mediacodecenc.c @@ -134,7 +134,7 @@ static int extract_extradata_support(AVCodecContext *avctx) static int mediacodec_init_bsf(AVCodecContext *avctx) { MediaCodecEncContext *s = avctx->priv_data; - char str[128]; + char str[128] = {0}; int ret; int crop_right = s->width - avctx->width; int crop_bottom = s->height - avctx->height; |