Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/vcpkg-ports/libsndfile/fix-wavlike.patch

14 lines
445 B
Diff
Raw Normal View History

2024-09-24 12:54:57 +00:00
diff --git a/src/wavlike.c b/src/wavlike.c
index a3388d75..cf5a7d2b 100644
--- a/src/wavlike.c
+++ b/src/wavlike.c
@@ -971,7 +971,7 @@ wavlike_subchunk_parse (SF_PRIVATE *psf, int chunk, uint32_t chunk_length)
else
psf_log_printf (psf, "%M : %u\n", chunk, chunk_length) ;
- while (bytesread < chunk_length)
+ while (chunk_length - bytesread >= 4)
{ uint32_t thisread ;
if ((thisread = psf_binheader_readf (psf, "m", &chunk)) == 0)