mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-08 08:41:21 +00:00
fix segfaults in fluid_is_soundfont() and fluid_is_midifile()
This commit is contained in:
parent
488da516cd
commit
4d612c22f4
2 changed files with 4 additions and 4 deletions
|
@ -94,13 +94,13 @@ int fluid_is_midifile(const char *filename)
|
|||
{
|
||||
FILE *fp = FLUID_FOPEN(filename, "rb");
|
||||
uint32_t id;
|
||||
int retcode = 0;
|
||||
int retcode = FALSE;
|
||||
|
||||
do
|
||||
{
|
||||
if(fp == NULL)
|
||||
{
|
||||
break;
|
||||
return retcode;
|
||||
}
|
||||
|
||||
if(FLUID_FREAD(&id, sizeof(id), 1, fp) != 1)
|
||||
|
|
|
@ -336,13 +336,13 @@ int fluid_is_soundfont(const char *filename)
|
|||
{
|
||||
FILE *fp = FLUID_FOPEN(filename, "rb");
|
||||
uint32_t fcc;
|
||||
int retcode = 0;
|
||||
int retcode = FALSE;
|
||||
|
||||
do
|
||||
{
|
||||
if(fp == NULL)
|
||||
{
|
||||
break;
|
||||
return retcode;
|
||||
}
|
||||
|
||||
if(FLUID_FREAD(&fcc, sizeof(fcc), 1, fp) != 1)
|
||||
|
|
Loading…
Reference in a new issue