TTimo / GtkRadiant

The open source, cross platform level editor for idtech games
http://icculus.org/gtkradiant/
Other
582 stars 152 forks source link

Fix warning the value of the size argument in strncat is too large #527

Closed Pan7 closed 6 years ago

Pan7 commented 6 years ago

radiant/texwindow.cpp:584:32: warning: the value of the size argument in 'strncat' is too large, might lead to a buffer overflow [-Wstrncat-size] strncat( shaderfile, colon, sizeof( shaderfile ) ); ^~~~~~~~ radiant/texwindow.cpp:584:32: note: change the argument to be the free space in the destination buffer minus the terminating null byte strncat( shaderfile, colon, sizeof( shaderfile ) );

See https://github.com/TTimo/GtkRadiant/issues/467