commit | 1b8af6bb45a9ad74fa374fb6414974e63ffc793b | [log] [tgz] |
---|---|---|
author | Erik de Castro Lopo <erikd@mega-nerd.com> | Sat Aug 29 05:21:43 2015 +1000 |
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | Sat Aug 29 05:22:22 2015 +1000 |
tree | fe7975c834a21e5a2cd970a477f97713b91dc8a1 | |
parent | 25d387377a0dcb5b2fd2aafab09bdd9c8b1e3ac7 [diff] |
libFLAC/fixed.c: Fix undefined behaviour Left shift if a negative integer such that the sign bit is affected is (according to the C spec) undefined behaviour and the residual calculations using the shift operator were hitting this. Fortunately these same calculations using plain multiplication do not invoke UB and according to benchmarking (on x86_64 linux) have the same performance as the bit shift version.