Add a width limit

This commit is contained in:
Luke Benstead 2018-09-20 16:48:26 +01:00
parent 9645b10ed6
commit e4f8cb8c9b

View File

@ -835,6 +835,13 @@ GLAPI void APIENTRY glColorTableEXT(GLenum target, GLenum internalFormat, GLsize
return;
}
/* Only allow up to 256 colours in a palette */
if(width > 256) {
_glKosThrowError(GL_INVALID_VALUE, __func__);
_glKosPrintError();
return;
}
GLuint sourceStride = _determineStride(format, type);
TextureConversionFunc convert = _determineConversion(