aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2015-08-20 01:16:28 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-08-20 01:16:28 +0000
commitf5fef23c56fc7f1f6dbfc61d385a8f8861d9777b (patch)
tree12a940bb1a93e261ec170bf240101d54036bd3ad
parent68fcda9a884cefe7530d2306bc39ce185ebd1660 (diff)
parente5a668d076a22427aea8e92e22b073bac6ff9087 (diff)
downloadtremolo-f5fef23c56fc7f1f6dbfc61d385a8f8861d9777b.tar.gz
am e5a668d0: am 36ec928f: Fix vorbis decoder crash due to out of bounds memory access
* commit 'e5a668d076a22427aea8e92e22b073bac6ff9087': Fix vorbis decoder crash due to out of bounds memory access
-rw-r--r--Tremolo/floor1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Tremolo/floor1.c b/Tremolo/floor1.c
index a2a035b..4a4937d 100644
--- a/Tremolo/floor1.c
+++ b/Tremolo/floor1.c
@@ -232,8 +232,9 @@ static void render_line(int n,int x0,int x1,int y0,int y1,ogg_int32_t *d){
if(n>x1)n=x1;
n -= x0;
- if (n <= 0)
+ if (n <= 0 || y0 < 0 || y0 > 255 || y1 < 0 || y1 > 255) {
return;
+ }
dy=y1-y0;
adx=x1-x0;
ady=abs(dy);