Skip to content
  • Erik de Castro Lopo's avatar
    bitwriter: Add overflow check · 28817ba5
    Erik de Castro Lopo authored
    The old version of `FLAC__bitwriter_write_raw_uint32()` assumes that the
    unused bits of the `val` argument are equal to zero, but don't check it.
    
    This patch adds a new version of that function which does have the check
    and then calls a new function `FLAC__bitwriter_write_raw_uint32_nocheck()`
    which behaves like the old one.
    
    Code updated to use these two functions as needed.
    
    Patch-from: lvqcl <lvqcl.mail@gmail.com>
    28817ba5