This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 9cd6040422fc479e7a8d4d822930cd7551f6fffd Author: Michael Niedermayer <[email protected]> AuthorDate: Tue Sep 29 01:25:17 2026 +0200 Commit: michaelni <[email protected]> CommitDate: Sun Oct 11 00:46:36 2026 +0000 avfilter/af_arnndn: reject model layers without inputs or neurons Fixes: out of array access Found during review of the security fix for BiaeRPmt9wwq Replicated through UnModified FFmpeg --- libavfilter/af_arnndn.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavfilter/af_arnndn.c b/libavfilter/af_arnndn.c index 7277a7258c..4ead29b31d 100644 --- a/libavfilter/af_arnndn.c +++ b/libavfilter/af_arnndn.c @@ -217,8 +217,8 @@ static int rnnoise_model_from_file(FILE *f, RNNModel **rnn) ALLOC_LAYER(DenseLayer, denoise_output); ALLOC_LAYER(DenseLayer, vad_output); -#define INPUT_VAL(name) do { \ - if (fscanf(f, "%d", &in) != 1 || in < 0 || in > 128) { \ +#define INPUT_VAL(name, min) do { \ + if (fscanf(f, "%d", &in) != 1 || in < (min) || in > 128) { \ rnnoise_model_free(ret); \ return AVERROR(EINVAL); \ } \ @@ -227,7 +227,7 @@ static int rnnoise_model_from_file(FILE *f, RNNModel **rnn) #define INPUT_ACTIVATION(name) do { \ int activation; \ - INPUT_VAL(activation); \ + INPUT_VAL(activation, 0); \ switch (activation) { \ case F_ACTIVATION_SIGMOID: \ name = ACTIVATION_SIGMOID; \ @@ -285,8 +285,8 @@ static int rnnoise_model_from_file(FILE *f, RNNModel **rnn) } while (0) #define INPUT_DENSE(name) do { \ - INPUT_VAL(name->nb_inputs); \ - INPUT_VAL(name->nb_neurons); \ + INPUT_VAL(name->nb_inputs, 1); \ + INPUT_VAL(name->nb_neurons, 1); \ ret->name ## _size = name->nb_neurons; \ INPUT_ACTIVATION(name->activation); \ NEW_LINE(); \ @@ -297,8 +297,8 @@ static int rnnoise_model_from_file(FILE *f, RNNModel **rnn) } while (0) #define INPUT_GRU(name) do { \ - INPUT_VAL(name->nb_inputs); \ - INPUT_VAL(name->nb_neurons); \ + INPUT_VAL(name->nb_inputs, 1); \ + INPUT_VAL(name->nb_neurons, 1); \ ret->name ## _size = name->nb_neurons; \ INPUT_ACTIVATION(name->activation); \ NEW_LINE(); \ -- 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]
