Possible infinite loop in WavpackPackInit
hepoun opened this issue · comments
When WavpackContext is configured for zero channels (although it isn't a viable usecase) the WavpackPackInit() ends in infinite loop. I suspect the following code:
Lines 519 to 520 in 22977b2
(v5.1.0)
Thanks for pointing this out. I was already made aware of this and decided to fix it in the individual parsers instead of in the library. You can see those fixes here and here for example.
I agree that it should be checked for in the library and will do that before the next release, but I think it would be silly to backport this into previous versions because, unlike the decoder, the encoder would never be the default handler for any file type.
Thanks again!