shithub: opus-tools

Download patch

ref: bd7489f687e30fd95abd08fbc2f1dcefcfa9a492
parent: 49c5f271e9a69fff754a17be226e44721aa6de8d
author: Michael Graczyk <michael@mgraczyk.com>
date: Mon Apr 25 16:43:34 EDT 2016

Fix potential uninitialized access for set-ctl-int

Signed-off-by: Mark Harris <mark.hsj@gmail.com>

--- a/src/opusenc.c
+++ b/src/opusenc.c
@@ -776,7 +776,7 @@
       }
     }else if(target<header.nb_streams){
       OpusEncoder *oe;
-      opus_multistream_encoder_ctl(st,OPUS_MULTISTREAM_GET_ENCODER_STATE(i,&oe));
+      opus_multistream_encoder_ctl(st,OPUS_MULTISTREAM_GET_ENCODER_STATE(target,&oe));
       ret=opus_encoder_ctl(oe, opt_ctls_ctlval[i*3+1],opt_ctls_ctlval[i*3+2]);
       if(ret!=OPUS_OK){
         fprintf(stderr,"Error opus_encoder_ctl(st[%d],%d,%d) returned: %s\n",target,opt_ctls_ctlval[i*3+1],opt_ctls_ctlval[i*3+2],opus_strerror(ret));