summaryrefslogtreecommitdiff
path: root/camlibs/canon
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2013-09-01 10:05:48 +0000
committerMarcus Meissner <marcus@jet.franken.de>2013-09-01 10:05:48 +0000
commitce758351632a149b5f05a103d2ef803ccc0bdba2 (patch)
tree583d14696f3c32aea1a24dc85a2bb15ee9846ba8 /camlibs/canon
parent49eda54de9c22d17ad64fb5f3f554fc682f77cf5 (diff)
downloadlibgphoto2-ce758351632a149b5f05a103d2ef803ccc0bdba2.tar.gz
do not deref a NULL ptr
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14526 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/canon')
-rw-r--r--camlibs/canon/canon.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/camlibs/canon/canon.c b/camlibs/canon/canon.c
index 321c5a852..c720a0ecd 100644
--- a/camlibs/canon/canon.c
+++ b/camlibs/canon/canon.c
@@ -2821,9 +2821,8 @@ canon_int_get_disk_name (Camera *camera, GPContext *context)
*/
msg = (unsigned char *)strdup ((char *)msg + 4); /* @@@ should check length */
if ( msg == NULL ) {
- GP_DEBUG ("canon_int_get_disk_name: could not allocate %li "
- "bytes of memory to hold response",
- (long)(strlen ((char *) msg + 4)));
+ GP_DEBUG ("canon_int_get_disk_name: could not allocate "
+ "memory to hold response");
return NULL;
}
break;