Skip to content

Commit

Permalink
Merge pull request #3 from pushd/out_of_range_encoding
Browse files Browse the repository at this point in the history
Ignore out-of-range exception parsing meta box content encoding
  • Loading branch information
bcherry authored Sep 30, 2017
2 parents 5f9d303 + fcf702d commit 5966a6f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Srcs/common/iteminfobox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,11 @@ void ItemInfoEntry::parseBox(BitStream& bitstr)
if (mItemType == "mime")
{
bitstr.readZeroTerminatedString(mContentType);
bitstr.readZeroTerminatedString(mContentEncoding);
try {
bitstr.readZeroTerminatedString(mContentEncoding);
} catch (std::out_of_range& e) {
// Some iPhone images break here, but it's not critical to the conversion
}
}
else if (mItemType == "uri ")
{
Expand Down

0 comments on commit 5966a6f

Please sign in to comment.