Skip to content
Snippets Groups Projects
Commit 488e6d56 authored by Alam Ed Arias's avatar Alam Ed Arias
Browse files

Merge branch 'fix-buffer-overflow-hookchangemusic' into 'next'

Fix buffer overflow when invoking MusicChange hook

See merge request STJr/SRB2!2441
parents dfb57319 15bf00e5
Branches
No related tags found
No related merge requests found
......@@ -2256,9 +2256,9 @@ void S_ChangeMusicEx(const char *mmusic, UINT16 mflags, boolean looping, UINT32
return;
strncpy(newmusic, mmusic, sizeof(newmusic)-1);
newmusic[6] = 0;
if (LUA_HookMusicChange(music_name, &hook_param))
return;
newmusic[6] = 0;
// No Music (empty string)
if (newmusic[0] == 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment