Commit ef24fae0 authored by Aleksey Kravchenko's avatar Aleksey Kravchenko

Fix crash on certain Canon flash modes

parent 1654cce6
......@@ -16,6 +16,7 @@ metacam (1.2-11) unstable; urgency=medium
- Support DEB_BUILD_OPTIONS=noopt and honour CPPFLAGS.
- Fix crashes on ill-formed Jpeg images (Closes: #779695, #779696).
- Fix crash on reading a long string field (Closes: #779697).
- Fix crash on certain Canon flash modes (LP: #298580).
-- Joao Eriberto Mota Filho <eriberto@debian.org> Sun, 20 Jan 2019 15:33:04 -0200
......
Description: Fix Metacam crash on certain canon camera flash modes.
Metacam segfaults on certain Flash Modes of Canon cameras.
The patch corrects array indexing, thus avoiding out of bounds
array access. For correct index to CanonFlashMode mapping see:
https://sno.phy.queensu.ca/~phil/exiftool/TagNames/Canon.html
Author: Aleksey Kravchenko <rhash.admin@gmail.com>
Bug-Ubuntu: https://launchpad.net/bugs/298580
Last-Update: 2019-01-21
diff --git a/dpyfuncs.cc b/dpyfuncs.cc
index 5a3aeed..37629cd 100644
--- a/dpyfuncs.cc
+++ b/dpyfuncs.cc
@@ -457,7 +457,7 @@ dpyCanonBlock1(OutputContext &ctx, const char *name, const IFDEntry &e, const vo
"Auto + Red-Eye Reduction", "On + Red-Eye Reduction"
};
if (v[4] <= 6)
- fmt(ctx, "Flash Mode", flashmodes[v[4]]);
+ fmt(ctx, "Flash Mode", flashmodes[v[4] - 1]);
else if (v[4] == 16)
fmt(ctx, "Flash Mode", "External");
} else
......@@ -4,3 +4,4 @@
40_support-noopt-build.patch
50_fix-BTS-crash-on-illformed-jpeg.patch
60_fix-BTS-crash-on-long-string.patch
70-fix-crash-on-canon-flash-modes.patch
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment