Skip to content

Commit b7a83c4

Browse files
marconeandi34
authored andcommitted
Fix vorbis decoder crash due to out of bounds memory access
Bug: 20915134 Change-Id: Ia7b503910b2fd0a4e3931837bd55dff3ea28ce86 (cherry picked from commit c7fdab4)
1 parent f22c84d commit b7a83c4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tremolo/floor1.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,9 @@ static void render_line(int n,int x0,int x1,int y0,int y1,ogg_int32_t *d){
232232

233233
if(n>x1)n=x1;
234234
n -= x0;
235-
if (n <= 0)
235+
if (n <= 0 || y0 < 0 || y0 > 255 || y1 < 0 || y1 > 255) {
236236
return;
237+
}
237238
dy=y1-y0;
238239
adx=x1-x0;
239240
ady=abs(dy);

0 commit comments

Comments
 (0)