0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-03-04 05:59:06 +00:00
termux-packages/packages/ffmpeg/debian-0004-avcodec-mediacodecenc-Fix-access-of-uninitialized-va.patch
Fredrik Fornwall 9d082fb7b7 enhance(main/ffmpeg): Use debian patches
ffmpeg is a large and complex code base that has occasional security and
functionality issues, while being not that frequently released.

This PR proposes syncing patches from debian, replacing our single
handpicked backported commit.

Run ./packages/ffmpeg/sync-debian-patches.sh to regenerate the patchset
from debian.
2025-01-21 16:40:01 +01:00

27 lines
947 B
Diff

From: Zhao Zhili <zhilizhao@tencent.com>
Date: Fri, 4 Oct 2024 01:30:57 +0800
Subject: 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 <zhilizhao@tencent.com>
(cherry picked from commit eff9ed7bff45998ea370e3d6f627529ad47e2e74)
---
libavcodec/mediacodecenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mediacodecenc.c b/libavcodec/mediacodecenc.c
index 6ca3968..e76ea81 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;