This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 786e245e809ddceadcc5d105616ef59fe30a1718 Author: 0xBat <[email protected]> AuthorDate: Mon Jan 5 02:11:45 2026 +0100 Commit: Michael Niedermayer <[email protected]> CommitDate: Fri Jan 9 23:44:59 2026 +0100 doc/examples/qsv_transcode: check for allocation failure Validate return value of av_malloc for dynamic_setting to avoid null pointer dereference. Signed-off-by: 0xBat <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]> --- doc/examples/qsv_transcode.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/examples/qsv_transcode.c b/doc/examples/qsv_transcode.c index 13b4933041..c3f507e8e6 100644 --- a/doc/examples/qsv_transcode.c +++ b/doc/examples/qsv_transcode.c @@ -351,6 +351,10 @@ int main(int argc, char **argv) } setting_number = (argc - 5) / 2; dynamic_setting = av_malloc(setting_number * sizeof(*dynamic_setting)); + if (!dynamic_setting) { + ret = AVERROR(ENOMEM); + goto end; + } current_setting_number = 0; for (int i = 0; i < setting_number; i++) { dynamic_setting[i].frame_number = atoi(argv[i*2 + 5]); _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
