[flac-dev] Possible overflow of _candidate_bits in stream_encoder.c

Erik de Castro Lopo mle+la at mega-nerd.com
Mon Jul 6 08:14:10 UTC 2020


Martijn van Beurden wrote:

> To trigger this overflow, one has to force rice_parameter to 0

Ok, that sounds dodgy.

> in for
> example the function evaluate_lpc_subframe in libFLAC/stream_encoder.c.
> When encoding noisy material, which needs a high rice parameter, it can
> happen that the return value of that function overflows.

Te value is currently uint32_t ?

> Should I send a patch to change all affected uint32_t to uint64_t? Or is
> this benign enough not to matter? As far as I can tell, such a patch should
> only touch private functions, no public ones.

Would be interested if there is any measureable difference in performance
from this change.

Erik
-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/


More information about the flac-dev mailing list