Metacam segfaults on certain flash modes

Bug #298580 reported by joseph on 2008-11-16
2
Affects Status Importance Assigned to Milestone
metacam (Ubuntu)
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

joseph (joseph-v) on 2008-11-16
description: updated
joseph (joseph-v) wrote :

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)

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package metacam - 1.2-11

---------------
metacam (1.2-11) unstable; urgency=medium

  [ Joao Eriberto Mota Filho ]
  * Using new DH level format. Consequently:
      - debian/compat: removed.
      - debian/control: changed from 'debhelper' to 'debhelper-compat' in
        Build-Depends field.
  * debian/copyright:
      - Added rights for Aleksey Kravchenko.
      - Updated packaging copyright years.

  [ Aleksey Kravchenko ]
  * Add Upstream Metadata file.
  * Bump std-version to 4.3.0.
  * d/patches:
    - 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 <email address hidden> Sun, 20 Jan 2019 15:33:04 -0200

Changed in metacam (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers