This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new e2798d5cad avfilter/dnn_backend_tf: validate inference request before
dereference
e2798d5cad is described below
commit e2798d5cad069cc76a9aa60895dc88309812b9b8
Author: Michael Niedermayer <[email protected]>
AuthorDate: Wed Oct 21 03:35:21 2026 +0000
Commit: guoyejun <[email protected]>
CommitDate: Wed Oct 21 11:39:12 2026 +0000
avfilter/dnn_backend_tf: validate inference request before dereference
Check the request before reading its fields and use a context-free log for
the NULL case. This makes the documented EINVAL return reachable.
Assisted-by: Fairy
---
libavfilter/dnn/dnn_backend_tf.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c
index c292a14efe..6882e0bb31 100644
--- a/libavfilter/dnn/dnn_backend_tf.c
+++ b/libavfilter/dnn/dnn_backend_tf.c
@@ -141,16 +141,21 @@ static TFInferRequest *tf_create_inference_request(void)
static int tf_start_inference(void *args)
{
TFRequestItem *request = args;
- TFInferRequest *infer_request = request->infer_request;
- LastLevelTaskItem *lltask = request->lltask;
- TaskItem *task = lltask->task;
- TFModel *tf_model = task->model;
+ TFInferRequest *infer_request;
+ LastLevelTaskItem *lltask;
+ TaskItem *task;
+ TFModel *tf_model;
if (!request) {
- av_log(tf_model->ctx, AV_LOG_ERROR, "TFRequestItem is NULL\n");
+ av_log(NULL, AV_LOG_ERROR, "TFRequestItem is NULL\n");
return AVERROR(EINVAL);
}
+ infer_request = request->infer_request;
+ lltask = request->lltask;
+ task = lltask->task;
+ tf_model = task->model;
+
TF_SessionRun(tf_model->session, NULL,
infer_request->tf_input, &infer_request->input_tensor, 1,
infer_request->tf_outputs, infer_request->output_tensors,
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]