commit | 8267168d283ae9bc213617b97afc6878f1cdfb8a | [log] [tgz] |
---|---|---|
author | Erik de Castro Lopo <erikd@mega-nerd.com> | Sun Feb 22 18:05:12 2015 +1100 |
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | Sun Feb 22 21:44:27 2015 +1100 |
tree | d742fbb80677ef661fe242994adf18b329bfa291 | |
parent | ffcda161ad1f47d730490c91bb95653c4a0be403 [diff] |
src/encode.c : Fix potential infinite loop in flac-toflac encoding. A malformed file (generated by AFL) had a 'samples_left_to_process' value of greater than the actual numbe of samples. When re-encoding the decoder would get to the end of the file and then continuously return a decode status of FLAC__STREAM_DECODER_END_OF_STREAM, causing an infinite loop. Solution is to break out of the loop on two consecutive end-of-stream events.