From 65eabcbf712193bf31070ec77352b21e53bba714 Mon Sep 17 00:00:00 2001 From: Johan Vromans Date: Wed, 14 Mar 2018 09:10:14 +0100 Subject: [PATCH] src/wav.c: Fix skipping of erroneous subchunks Closes: https://github.com/erikd/libsndfile/issues/370 --- src/wavlike.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wavlike.c b/src/wavlike.c index b2594f9b..386913f1 100644 --- a/src/wavlike.c +++ b/src/wavlike.c @@ -963,7 +963,7 @@ wavlike_subchunk_parse (SF_PRIVATE *psf, int chunk, uint32_t chunk_length) */ psf_log_printf (psf, " *** Found weird-ass zero marker. Jumping to end of chunk.\n") ; if (bytesread < chunk_length) - bytesread += psf_binheader_readf (psf, "j", chunk_length - bytesread + 4) ; + bytesread += psf_binheader_readf (psf, "j", chunk_length - bytesread) ; psf_log_printf (psf, " *** Offset is now : 0x%X\n", psf_fseek (psf, 0, SEEK_CUR)) ; return 0 ;