Closed kcgen closed 2 years ago
Fix in the dev branch. I don't think this was an error in practice because I already have a guard in place at initialization time:
/* The number of bytes per frame must be known. If not, it's an invalid file and not decodable. */
if (drwav_get_bytes_per_pcm_frame(pWav) == 0) {
return DRWAV_FALSE;
}
In any case, I've added some checks in the relevant places and I think these ones should be cleaned up now.
These fixes have been released.
"The program will have undefined behavior, likely a crash. In drwav_seek_to_pcm_frame: Division or modulo by zero results in undefined behavior. (CWE-369)"