Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1391)

Unified Diff: src/opus_multistream_decoder.c

Issue 882843002: Update to opus-HEAD-66611f1. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/opus.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/opus_multistream_decoder.c
diff --git a/src/opus_multistream_decoder.c b/src/opus_multistream_decoder.c
index a05fa1e765bbba64723ee504e24db72b62f62f4d..b95eaa6eac12f036ab9f0a4de65621bf57e5b8c0 100644
--- a/src/opus_multistream_decoder.c
+++ b/src/opus_multistream_decoder.c
@@ -75,7 +75,7 @@ int opus_multistream_decoder_init(
char *ptr;
if ((channels>255) || (channels<1) || (coupled_streams>streams) ||
- (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0))
+ (streams<1) || (coupled_streams<0) || (streams>255-coupled_streams))
return OPUS_BAD_ARG;
st->layout.nb_channels = channels;
@@ -119,7 +119,7 @@ OpusMSDecoder *opus_multistream_decoder_create(
int ret;
OpusMSDecoder *st;
if ((channels>255) || (channels<1) || (coupled_streams>streams) ||
- (coupled_streams+streams>255) || (streams<1) || (coupled_streams<0))
+ (streams<1) || (coupled_streams<0) || (streams>255-coupled_streams))
{
if (error)
*error = OPUS_BAD_ARG;

Powered by Google App Engine
This is Rietveld 408576698