Fix allocated buffer size to avoid buffer overflow.
This commit is contained in:
parent
e2c5359e8b
commit
0d8cf03809
|
@ -769,7 +769,7 @@ const GLubyte * internal_glGetString(GLenum name) {
|
||||||
return NULL;
|
return NULL;
|
||||||
} else {
|
} else {
|
||||||
size_t len = strlen(GL_Extensions);
|
size_t len = strlen(GL_Extensions);
|
||||||
internal_gl_extensions = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
|
internal_gl_extensions = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len + 2);
|
||||||
|
|
||||||
while (*GL_Extensions != 0x00) {
|
while (*GL_Extensions != 0x00) {
|
||||||
const char* Start = GL_Extensions;
|
const char* Start = GL_Extensions;
|
||||||
|
|
Loading…
Reference in New Issue