Repository navigation
Bound advisory camera sidecar reads - #50
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Selecting a card could load an entire camera metadata sidecar just to guess a camera label. A large
.ARI, XML, XMP, DAT, or ALE file could therefore consume far more memory than a naming hint warrants. These readers now use a shared 4 MiB cap, require a regular file, refuse leaf symlinks, check cancellation while reading, and discard truncated or oversized input instead of parsing a partial prefix. Sony, Canon, Panasonic, and ARRI continue to later candidates so a bad or generic first sidecar cannot hide a valid model.This is advisory camera naming/fingerprinting only. It does not change the transfer set, source files, destination writes, verification, reports, or safety verdicts. A legitimate sidecar above the cap may result in a generic or missing camera label.
Local validation:
./test.sh mac-teston the final PR head: 1,226 passed, 14 skipped, 0 failed../test.sh ipad-buildon the final PR head: passed.ac860897), the source/test diff remained byte-identical and focused Mac tests passed 12/12 again;git diff --checkis clean.Scope limits:
O_NOFOLLOWprotects the opened leaf, not every ancestor directory. The existing first-three XML work budget in shared detection is unchanged, and ImageIO's separate media-metadata path is outside this sidecar-read change. This does not establish a cause or fix for issue #23.