Metacam segfaults on certain flash modes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
metacam (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: metacam
Metacam seems to segfault on certain Flash Modes (I'm using Canon 350d)
I downloaded source package and applied the ubuntu diffs to it and ran through gdb. I found the following line seems to contain a problem (dpyfuncs.cc: 435)
if (v[4]) {
static char *flashmodes[] = {
"Auto", "On", "Red-Eye Reduction", "Slow Synchro",
"Auto + Red-Eye Reduction", "On + Red-Eye Reduction"
};
if (v[4] <= 6) //<----- Should be < (not <=) as there are only 6 elements in flashmodes ?
fmt(ctx, "Flash Mode", flashmodes[v[4]]);
else if (v[4] == 16)
fmt(ctx, "Flash Mode", "External");
} else
I think:
a) dpyfuncs.cc:435 should read: if(v[4] < 6)
or
b) There should be another element in flashmodes
Please correct me if I'm wrong, or ask for more information.
Regards,
joseph
Further thought from http:// www.sno. phy.queensu. ca/~phil/ exiftool/ TagNames/ Canon.html# FileInfo
4 CanonFlashMode int16s
0 = Off
1 = Auto
2 = On
3 = Red-eye reduction
4 = Slow-sync
5 = Red-eye reduction (Auto)
6 = Red-eye reduction (On)
16 = External flash
The 0th element of flashmodes should be "Off"
static char *flashmodes[] = {
"Off", "Auto", "On", "Red-Eye Reduction", "Slow Synchro",
"Auto + Red-Eye Reduction", "On + Red-Eye Reduction"
line 435 should be: if (v[4] <= 6)