Fix buffer overflow warnings in OpenGL 3.0 video display file handling

Patch from davefiddes. Original commit message :

This fixes issues reported by gcc 10 with the size of various filename buffers
when concatenating strings into them.

Tests:
 - Build cleanly with gcc 10
 - Run a Pentium MMX Win98 machine and use custom GLSLP shader
This commit is contained in:
SarahW 2020-07-14 19:42:20 +01:00
commit b5bc47ea2f
4 changed files with 5 additions and 5 deletions

View file

@ -163,9 +163,9 @@ void get_glslp_name(const char* f, char* s, int size)
glslp_t* glslp_parse(const char* f)
{
int i, j, len, sublen;
char s[512], t[512], z[512];
char s[512], t[512], z[540];
s[511] = 0;
memset(s, 0, sizeof(s));
if (endswith(f, ".glsl"))
return glsl_parse(f);