diff options
author | whatdoineed2do <whatdoineed2do@gmail.com> | 2019-07-25 03:57:49 +0100 |
---|---|---|
committer | Stephen F. Booth <me@sbooth.org> | 2019-07-25 07:27:49 +0430 |
commit | 79bc9ccf8ea5606da2a86e1bfb5439e73a146272 (patch) | |
tree | 80cfb9b03d2ad747c4263f561ca858051d2adbf6 /tests | |
parent | ba7adc2bc261ed634c2a964185bcffb9365ad2f4 (diff) |
Call fflush() before ftruncate() to drop all buffered data (#914)
This avoids stale data presented to caller via a fread()
Current bug due to the buffered data can be seen in stripping mp3s of tags
f.strip(ID3v1);
f.strip(APE);
The ID3v1 tag sits at the end of file (strip calls ftruncate()) and the APE
strip performs a readFile() that would return the stream buffered/truncated data
and reinsert
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions