In FLAC 1.2.1 there was an assert in FLAC__bitmath_ilog2 and FLAC__bitmath_ilog2_wide functions:
unsigned FLAC__bitmath_ilog2(FLAC__uint32 v) { unsigned l = 0; FLAC__ASSERT(v > 0); while(v >>= 1) l++; return l; } Now there's no test for the argument of FLAC__bitmath_ilog2(), and if its argument is equal to 0, the result is "undefined". FLAC__bitmath_ilog2_wide() returns 0 in this case. (Actually their arguments are really never equal to 0) This patch re-adds FLAC__ASSERT() to bitmath functions (better to have an assert in debug mode instead of undefined result).
15_bitmath.patch
Description: Binary data
_______________________________________________ flac-dev mailing list flac-dev@xiph.org http://lists.xiph.org/mailman/listinfo/flac-dev