shithub: opus

Download patch

ref: f1b088001ecbc523ffb07109f301d8773bec44b8
parent: 4ad7d2108133d070605b25b1eb91e32c279bf81e
author: Mark Harris <[email protected]>
date: Wed Jul 6 18:45:41 EDT 2022

Fix uninitialized field on custom mode malloc fail

--- a/celt/modes.c
+++ b/celt/modes.c
@@ -173,7 +173,10 @@
    mode->nbAllocVectors = BITALLOC_SIZE;
    allocVectors = opus_alloc(sizeof(unsigned char)*(BITALLOC_SIZE*mode->nbEBands));
    if (allocVectors==NULL)
+   {
+      mode->allocVectors = NULL;
       return;
+   }
 
    /* Check for standard mode */
    if (mode->Fs == 400*(opus_int32)mode->shortMdctSize)