aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Nelissen <marcone@google.com>2015-05-14 22:59:23 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-05-14 22:59:23 +0000
commite7e065b172e01c2cda0ff21ff922dd2c76135082 (patch)
tree9f0208a6daf44705651b8f23e1418e12a8fe640e
parente8d225b467f5c8ddca79d598e13850df6fde01bd (diff)
parent0ec5338fec5ab4f39842066fb64534a155b1e314 (diff)
downloadtremolo-e7e065b172e01c2cda0ff21ff922dd2c76135082.tar.gz
am 0ec5338f: Merge "Fix vorbis decoder crash due to out of bounds memory access" into mnc-dev
* commit '0ec5338fec5ab4f39842066fb64534a155b1e314': 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);