mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 21:40:20 +01:00
fix for-loop in _mesa_GetDouble to avoid out of bounds memory read
This commit is contained in:
parent
f8582b6c1f
commit
845f2a7350
2 changed files with 2 additions and 2 deletions
|
|
@ -5627,7 +5627,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
|
|||
|
||||
_mesa_GetFloatv(pname, values);
|
||||
|
||||
for (i = 0; values[i] != magic && i < 16; i++)
|
||||
for (i = 0; i < 16 && values[i] != magic; i++)
|
||||
params[i] = (GLdouble) values[i];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1178,7 +1178,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
|
|||
|
||||
_mesa_GetFloatv(pname, values);
|
||||
|
||||
for (i = 0; values[i] != magic && i < 16; i++)
|
||||
for (i = 0; i < 16 && values[i] != magic; i++)
|
||||
params[i] = (GLdouble) values[i];
|
||||
}
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue