From be05a7e1945588dfbba2004debc2bba1607e249e Mon Sep 17 00:00:00 2001 From: cedorg <96918447+cedorg@users.noreply.github.com> Date: Fri, 31 Dec 2021 18:17:02 +0100 Subject: [PATCH] Fix buffer overflow. (#13436) retroarch sometimes crashes at startup when loading asset textures with gl1 driver. Co-authored-by: cborg --- gfx/drivers/gl1.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gfx/drivers/gl1.c b/gfx/drivers/gl1.c index a856971062..e7acb7bf7a 100644 --- a/gfx/drivers/gl1.c +++ b/gfx/drivers/gl1.c @@ -1304,6 +1304,7 @@ static void gl1_load_texture_data( #ifndef VITA glPixelStorei(GL_UNPACK_ALIGNMENT, alignment); + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); #endif glTexImage2D(GL_TEXTURE_2D,