fix a few crash bugs with invalid stb_vorbis files (reported by Philip Bennefall, found using a fuzz tester)

This commit is contained in:
Sean Barrett
2015-09-03 11:16:19 -07:00
parent 7670656322
commit a3d62dfec1
2 changed files with 15 additions and 6 deletions

View File

@ -85,6 +85,8 @@ int main(int argc, char **argv)
unsigned int successes=0, attempts = 0;
unsigned int num_samples = stb_vorbis_decode_filename(argv[j], &num_chan, &samprate, &output);
break;
if (num_samples == 0xffffffff) {
fprintf(stderr, "Error: couldn't open file or not vorbis file: %s\n", argv[j]);
goto fail;