Bug 178572 - [PATCH] gphoto2 --summary segfaults
Summary: [PATCH] gphoto2 --summary segfaults
Alias: None
Product: Fedora
Classification: Fedora
Component: gphoto2   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Radek Vokal
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2006-01-21 20:24 UTC by Jindrich Novy
Modified: 2013-07-02 23:13 UTC (History)
1 user (show)

Fixed In Version: 2.1.99-4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-01-23 07:04:22 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to fix this. (1.61 KB, patch)
2006-01-21 20:25 UTC, Jindrich Novy
no flags Details | Diff

Description Jindrich Novy 2006-01-21 20:24:54 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7

Description of problem:
gphoto2 --sumary segfaults when there's no storage card in any Canon
family camera. (Canon EOS 300D in my case)

What happens:
env LANG=C gdb --args gphoto2 --debug --summary


10.597199 canon/usb.c(2): canon_usb_dialogue: camera status "No storage
card in camera" in response to command 0x9 0x11 0x201 (Disk info

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208162640 (LWP 3774)]
canon_int_get_disk_name_info (camera=0x8c71860, name=0xbfbe368e "C:\\",
capacity=0x8c754f8, available=0x8c754fc, context=0x8c74840) at
1788                                    cap = le32atoh (msg + 4);
(gdb) p msg
$1 = (unsigned char *) 0x0

The returned msg from the canon_usb_dialogue() is used before checked
it's != NULL. It causes the segfault when there's no storage card in the

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Have a Canon camera connected via USB.
2. gphoto2 --summary
3. Segmentation Fault

Actual Results:  Segmentation Fault

Expected Results:  No Segmentation Fault.

Additional info:

Comment 1 Jindrich Novy 2006-01-21 20:25:58 UTC
Created attachment 123532 [details]
Patch to fix this.

Comment 2 Radek Vokal 2006-01-23 07:04:22 UTC
Thanks, checked in

Note You need to log in before you can comment on or make changes to this bug.