An issue was discovered in Freeware Advanced Audio Decoder 2 (FAAD2) 2.8.8. The faadresetbits function in libfaad/bits.c is affected by a buffer overflow vulnerability. The number of bits to be read is determined by ld->buffersize - words4, cast to uint32. If ld->buffer_size - words4 is negative, a buffer overflow is later performed via getdwordn(&ld->start[words], ld->bytesleft).