rpms/gphoto2/devel gphoto2-2.1.99-canon_segv.patch, NONE, 1.1 gphoto2.spec, 1.49, 1.50

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Jan 23 07:17:02 UTC 2006


Author: rvokal

Update of /cvs/dist/rpms/gphoto2/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv1330

Modified Files:
	gphoto2.spec 
Added Files:
	gphoto2-2.1.99-canon_segv.patch 
Log Message:
- fixed gphoto2 --summary segfault with Canon cameras (#178572)

gphoto2-2.1.99-canon_segv.patch:
 canon.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

--- NEW FILE gphoto2-2.1.99-canon_segv.patch ---
--- gphoto2-2.1.99/libgphoto2-2.1.99/camlibs/canon/canon.c.jn	2005-11-23 14:47:36.000000000 +0100
+++ gphoto2-2.1.99/libgphoto2-2.1.99/camlibs/canon/canon.c	2006-01-21 20:08:54.000000000 +0100
@@ -1776,6 +1776,8 @@ canon_int_get_disk_name_info (Camera *ca
                                         name_local[len-1] = 0;
                                 msg = canon_usb_dialogue (camera, CANON_USB_FUNCTION_DISK_INFO_2, &len,
                                                           name_local, len );
+                                if ( msg == NULL )
+                                        return GP_ERROR_OS_FAILURE;
                                 /* These newer cameras report sizes in
                                  * K instead of bytes, so max capacity
                                  * is 4TB rather than 4GB. */
@@ -1785,11 +1787,11 @@ canon_int_get_disk_name_info (Camera *ca
                         else {
                                 msg = canon_usb_dialogue (camera, CANON_USB_FUNCTION_DISK_INFO, &len,
                                                           name, strlen (name) + 1);
+                                if ( msg == NULL )
+                                        return GP_ERROR_OS_FAILURE;
                                 cap = le32atoh (msg + 4);
                                 ava = le32atoh (msg + 8);
                         }
-                        if ( msg == NULL )
-                                return GP_ERROR_OS_FAILURE;
                         break;
                 case GP_PORT_SERIAL:
                         msg = canon_serial_dialogue (camera, context, 0x09, 0x11, &len, name,


Index: gphoto2.spec
===================================================================
RCS file: /cvs/dist/rpms/gphoto2/devel/gphoto2.spec,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- gphoto2.spec	13 Jan 2006 13:54:31 -0000	1.49
+++ gphoto2.spec	23 Jan 2006 07:16:58 -0000	1.50
@@ -16,6 +16,7 @@
 Source4: gphoto-set-procperm
 Patch2: gphoto2-gcc4.patch
 Patch3: gphoto2-2.1.99-dbus.patch
+Patch4: gphoto2-2.1.99-canon_segv.patch
 Url: http://www.gphoto.org/
 ExcludeArch: s390 s390x
 PreReq: /sbin/ldconfig, grep, fileutils
@@ -73,6 +74,7 @@
 %setup -q -a 1
 %patch2 -p1 -b .gcc4
 %patch3 -p1 -b .dbus
+%patch4 -p1 -b .segv
 
 ####################################
 %build
@@ -210,6 +212,9 @@
 # ChangeLog
 ########################################################################
 %changelog
+* Mon Jan 23 2006 Radek Vokal <rvokal at redhat.com> 2.1.99-4
+- fixed gphoto2 --summary segfault with Canon cameras (#178572)
+
 * Fri Jan 13 2006 Radek Vokal <rvokal at redhat.com> 2.1.99-3
 - export LIBDIR before creating .fdi file
 




More information about the fedora-cvs-commits mailing list