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 <snip> 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 request) 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 canon.c:1788 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 camera. Version-Release number of selected component (if applicable): How reproducible: Always 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:
Created attachment 123532 [details] Patch to fix this.
Thanks, checked in