Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@amazon.com>2023-11-26 11:16:34 +0300
committerJean-Marc Valin <jmvalin@amazon.com>2023-11-26 11:16:34 +0300
commitc9af8f80f7976a7694c710f1426d816a67364a56 (patch)
tree5ce34431b0364a9882505140ba5501fc18917199
parent5c3795b2879108f897d465f36885408d5325b77b (diff)
Fix potential read out of bounds in fargan
-rw-r--r--dnn/fargan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dnn/fargan.c b/dnn/fargan.c
index 58115fe3..451fcacb 100644
--- a/dnn/fargan.c
+++ b/dnn/fargan.c
@@ -50,7 +50,7 @@ static void compute_fargan_cond(FARGANState *st, float *cond, const float *featu
celt_assert(FARGAN_FEATURES+COND_NET_PEMBED_OUT_SIZE == model->cond_net_fdense1.nb_inputs);
celt_assert(COND_NET_FCONV1_IN_SIZE == model->cond_net_fdense1.nb_outputs);
celt_assert(COND_NET_FCONV1_OUT_SIZE == model->cond_net_fconv1.nb_outputs);
- OPUS_COPY(&dense_in[NB_FEATURES], &model->cond_net_pembed.float_weights[IMAX(0,IMIN(period-32, 224))*COND_NET_PEMBED_OUT_SIZE], COND_NET_PEMBED_OUT_SIZE);
+ OPUS_COPY(&dense_in[NB_FEATURES], &model->cond_net_pembed.float_weights[IMAX(0,IMIN(period-32, 223))*COND_NET_PEMBED_OUT_SIZE], COND_NET_PEMBED_OUT_SIZE);
OPUS_COPY(dense_in, features, NB_FEATURES);
compute_generic_dense(&model->cond_net_fdense1, conv1_in, dense_in, ACTIVATION_TANH, st->arch);