Skip to content

catch stoul exceptions in CanonMakerNote print0x000a/print0x000c (backport #9320)#9373

Closed
mergify[bot] wants to merge 2 commits into
0.29.xfrom
mergify/bp/0.29.x/pr-9320
Closed

catch stoul exceptions in CanonMakerNote print0x000a/print0x000c (backport #9320)#9373
mergify[bot] wants to merge 2 commits into
0.29.xfrom
mergify/bp/0.29.x/pr-9320

Conversation

@mergify

@mergify mergify Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

print0x000a and print0x000c call std::stoul(value.toString()), but the stored type of Canon tags 0x000a and 0x000c is not enforced during parsing, so a crafted makernote can hand them a non-numeric ASCII value. stoul then throws std::invalid_argument, which Exifdatum::write does not catch (it only guards std::out_of_range), so it escapes during -pa printing. Catch both and fall back to the raw value, like the existing path in print0x000c.


This is an automatic backport of pull request #9320 done by Mergify.

@kmilos kmilos deleted the mergify/bp/0.29.x/pr-9320 branch July 1, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants