Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FLAC: Fails to save if file contains too large picture block with invalid block size #226

Closed
lazka opened this issue Jul 4, 2015 · 1 comment
Labels
bug

Comments

@lazka
Copy link
Member

@lazka lazka commented Jul 4, 2015

Originally reported by: Christoph Reiter (Bitbucket: lazka, GitHub: lazka)


As reported by zas (Laurent Monin) per mail.

As making sure that everything which we can read can also be saved back and we don't make the resulting file more broken we should write those too large images back anyway.


@lazka

This comment has been minimized.

Copy link
Member Author

@lazka lazka commented Jul 4, 2015

Original comment by Christoph Reiter (Bitbucket: lazka, GitHub: lazka):


fixed: https://bitbucket.org/lazka/mutagen/commits/6940b5825e23060b12e62c92c63dd5db371eb59d

@lazka lazka added major bug labels Apr 7, 2016
@lazka lazka closed this Apr 7, 2016
lazka added a commit that referenced this issue Apr 7, 2016
…block. (Fixes isse #226)

In case the file contains a flac image block which has a invalid block size
and the containing data is larger than what can be contained in a picture block
we successfully load the file since we ignore the block size and use the
picture size instead. When saving, this will fail as we want to write
the correct block size back which is in this case too large. Instead
remember the incorrect block size in case the real block size was
too large and save it back as is. This allows us to save everything we load
and write invalid flac files only if the source was invalid is well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.