[FFmpeg-devel] [PATCH 5/5] doc/examples/qsv_transcode: Initialize pointer before free
Michael Niedermayer
michael at niedermayer.cc
Wed Apr 24 04:45:22 EEST 2024
Fixees: CID1517023 Uninitialized pointer read
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
doc/examples/qsv_transcode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/examples/qsv_transcode.c b/doc/examples/qsv_transcode.c
index 8e843ddd84c..665a76af2ed 100644
--- a/doc/examples/qsv_transcode.c
+++ b/doc/examples/qsv_transcode.c
@@ -342,7 +342,7 @@ int main(int argc, char **argv)
{
const AVCodec *enc_codec;
int ret = 0;
- AVPacket *dec_pkt;
+ AVPacket *dec_pkt = NULL;
if (argc < 5 || (argc - 5) % 2) {
av_log(NULL, AV_LOG_ERROR, "Usage: %s <input file> <encoder> <output file>"
--
2.43.2
More information about the ffmpeg-devel
mailing list