mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Fix potential null pointer dereference in S_DefineAudioIfSupported() when passing filenames without extensions
git-svn-id: https://svn.eduke32.com/eduke32@6999 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
2cb5d948e8
commit
8b2d546774
1 changed files with 2 additions and 2 deletions
|
@ -5044,11 +5044,11 @@ static int32_t S_DefineAudioIfSupported(char **fn, const char *name)
|
|||
#if !defined HAVE_FLAC || !defined HAVE_VORBIS
|
||||
const char *extension = Bstrrchr(name, '.');
|
||||
# if !defined HAVE_FLAC
|
||||
if (!Bstrcasecmp(extension, ".flac"))
|
||||
if (extension && !Bstrcasecmp(extension, ".flac"))
|
||||
return -2;
|
||||
# endif
|
||||
# if !defined HAVE_VORBIS
|
||||
if (!Bstrcasecmp(extension, ".ogg"))
|
||||
if (extension && !Bstrcasecmp(extension, ".ogg"))
|
||||
return -2;
|
||||
# endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue