diff --git a/src/mod/codecs/mod_amr/mod_amr.c b/src/mod/codecs/mod_amr/mod_amr.c index b36b4c9aa3..67426b81c8 100644 --- a/src/mod/codecs/mod_amr/mod_amr.c +++ b/src/mod/codecs/mod_amr/mod_amr.c @@ -150,6 +150,9 @@ static switch_bool_t switch_amr_unpack_oa(unsigned char *buf, uint8_t *tmp, int int index; int framesz; + if (!buf) { + return SWITCH_FALSE; + } buf++; /* CMR skip */ tocs = buf; index = ((tocs[0]>>3) & 0xf);