Summary: | Corrupted FLAC files scan can result in heavy CPU consumption | ||
---|---|---|---|
Product: | [Frameworks and Libraries] taglib | Reporter: | arnaud.bienner |
Component: | general | Assignee: | Scott Wheeler <wheeler> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | adaptee, arnaud.bienner, info, lalinsky |
Priority: | NOR | ||
Version: | 1.7 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
URL: | http://code.google.com/p/clementine-player/issues/detail?id=3069 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
Consider FLAC file as being invalid if a 0 length block is found
Faster FLAC::FilePrivate destructor |
Description
arnaud.bienner
2012-07-24 17:16:30 UTC
Created attachment 72730 [details]
Consider FLAC file as being invalid if a 0 length block is found
I preferred to check the length at the same time we check the size is OK.
I believe it's not a big deal to read a 0 length block before, as it doesn't break anything.
If it's not OK for you, this can be changed by having a extra if block for length == 0 with debug/setValid/return inside; before actually reading the block.
Created attachment 72731 [details]
Faster FLAC::FilePrivate destructor
As explained before, this speed up destructor for me.
Not sure it always speed up, but I think it never slow down.
If you agree with my changes and it's easier for you, I can make a pull request on GitHub. Not sure why no one has chimed in yet. But yes, please submit a pull request on GitHub. This sounds like an issue in TagLib that should be fixed. OK. I've submitted a pull request, as suggested: https://github.com/taglib/taglib/pull/73 Hope someone will have some time to review it. |