Menu

#945 segfault if CF card is absent

closed-fixed
None
5
2013-05-12
2013-03-26
No

gphoto 2.5.1.1 segfaults on "--summary" in ptpc:1880 ptp_canon_eos_getobjectinfoex
if there is no CF card in a Canon 30D.
The following patch fixes the bug:

--- camlibs/ptp2/ptp.c.orig 2013-03-26 00:21:09.000000000 +0100
+++ camlibs/ptp2/ptp.c 2013-03-26 00:11:55.000000000 +0100
@@ -1877,6 +1877,10 @@
if (ret != PTP_RC_OK)
return ret;

  • if (!data) {
  • *nrofentries = 0;
  • return PTP_RC_OK;
  • }
    nrofentries = dtoh32a(data);
    entries = malloc(nrofentries * sizeof(PTPCANONFolderEntry));
    if (!
    entries)

Discussion

  • Marcus Meissner

    Marcus Meissner - 2013-03-26
    • status: open-fixed --> pending-fixed
     
  • Marcus Meissner

    Marcus Meissner - 2013-03-26

    applied, thanks!

    did not see it on the EOS 1000D

     
  • Marcus Meissner

    Marcus Meissner - 2013-05-12
    • status: pending-fixed --> closed-fixed
    • assigned_to: Marcus Meissner
     
  • Marcus Meissner

    Marcus Meissner - 2013-05-12

    is fixed in 2.5.2

     

Log in to post a comment.

MongoDB Logo MongoDB