shithub: opusfile

Download patch

ref: 810024427a7db442e532a3774fb6d77d15e9f57d
parent: 7d672dd2547b5894f062922076b7a451fef96999
author: Timothy B. Terriberry <[email protected]>
date: Mon Mar 25 07:57:38 EDT 2013

Fix a buffer overflow in op_read_stereo().

For multichannel files, this potentially caused writes beyond the
 end of the output buffer provided by the user.

--- a/src/opusfile.c
+++ b/src/opusfile.c
@@ -3052,7 +3052,7 @@
       _nsamples=op_stereo_filter(_of,_src,_nsamples*2,
        _src,_nsamples,_nchannels);
     }
-    op_shaped_dither16(_of,dst,_src,_nsamples,_nchannels);
+    op_shaped_dither16(_of,dst,_src,_nsamples,2);
   }
   return _nsamples;
 }