mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 20:11:12 +00:00
Merge branch 'fix-buffer-overflow-hookchangemusic' into 'next'
Fix buffer overflow when invoking MusicChange hook See merge request STJr/SRB2!2441
This commit is contained in:
commit
488e6d5699
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue