mirror of
https://github.com/ZDoom/fluidsynth.git
synced 2025-04-18 13:41:05 +00:00
Fix another NULL dereference
Access to field 'zone' results in a dereference of a null pointer (loaded from variable 'pr'), if size is negative. However, size should be unsigned.
This commit is contained in:
parent
c4cd8bfc24
commit
18fdafe37f
1 changed files with 4 additions and 3 deletions
|
@ -304,7 +304,7 @@ static int load_phdr(SFData *sf, unsigned int size);
|
|||
static int load_pbag(SFData *sf, int size);
|
||||
static int load_pmod(SFData *sf, int size);
|
||||
static int load_pgen(SFData *sf, int size);
|
||||
static int load_ihdr(SFData *sf, int size);
|
||||
static int load_ihdr(SFData *sf, unsigned int size);
|
||||
static int load_ibag(SFData *sf, int size);
|
||||
static int load_imod(SFData *sf, int size);
|
||||
static int load_igen(SFData *sf, int size);
|
||||
|
@ -1573,9 +1573,10 @@ static int load_pgen(SFData *sf, int size)
|
|||
}
|
||||
|
||||
/* instrument header loader */
|
||||
static int load_ihdr(SFData *sf, int size)
|
||||
static int load_ihdr(SFData *sf, unsigned int size)
|
||||
{
|
||||
int i, i2;
|
||||
unsigned int i;
|
||||
int i2;
|
||||
SFInst *p, *pr = NULL; /* ptr to current & previous instrument */
|
||||
unsigned short zndx, pzndx = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue