diff --git a/src/wavlike.c b/src/wavlike.c index a3388d75..0db71323 100644 --- a/src/wavlike.c +++ b/src/wavlike.c @@ -1089,7 +1089,7 @@ wavlike_subchunk_parse (SF_PRIVATE *psf, int chunk, uint32_t chunk_length) chunk_size += (chunk_size & 1) ; psf_log_printf (psf, " *** %M : %u\n", chunk, chunk_size) ; if (bytesread + chunk_size > chunk_length) - { bytesread += psf_binheader_readf (psf, "j", chunk_length - bytesread + 4) ; + { bytesread += psf_binheader_readf (psf, "j", chunk_length - bytesread) ; continue ; } else diff --git a/tests/error_test.c b/tests/error_test.c index e89382d6..9cdabf4e 100644 --- a/tests/error_test.c +++ b/tests/error_test.c @@ -199,17 +199,15 @@ wav_list_recover_test (const char * filename) memset (&sfinfo, 0, sizeof (sfinfo)) ; sndfile = sf_open (filename, SFM_READ, &sfinfo) ; - if (sndfile) - { printf ("\n\nLine %d : expected failure - issue 374 reports no recovery from bogus LIST content.\n", __LINE__) ; + if (!sndfile) + { printf ("\n\nLine %d : expected recovery from bogus LIST content.\n", __LINE__) ; exit (1) ; } ; - /* if (sfinfo.frames != 2) { printf ("\n\nLine %d : Should have read data chunk with 2 stereo frames, got %ld.\n\n", __LINE__, (long)sfinfo.frames) ; exit (1) ; } ; - */ unlink (filename) ; puts ("ok") ;