[mod_amr] scan-build: Array access (from variable 'tocs') results in a null pointer dereference - switch_amr_unpack_oa()
This commit is contained in:
parent
42d3100609
commit
0c2873e726
|
@ -150,6 +150,9 @@ static switch_bool_t switch_amr_unpack_oa(unsigned char *buf, uint8_t *tmp, int
|
||||||
int index;
|
int index;
|
||||||
int framesz;
|
int framesz;
|
||||||
|
|
||||||
|
if (!buf) {
|
||||||
|
return SWITCH_FALSE;
|
||||||
|
}
|
||||||
buf++; /* CMR skip */
|
buf++; /* CMR skip */
|
||||||
tocs = buf;
|
tocs = buf;
|
||||||
index = ((tocs[0]>>3) & 0xf);
|
index = ((tocs[0]>>3) & 0xf);
|
||||||
|
|
Loading…
Reference in New Issue