summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2012-06-08 20:17:48 +0000
committerMarcus Meissner <marcus@jet.franken.de>2012-06-08 20:17:48 +0000
commit99dc0ee0abe1908a0b59b62d8733445f84dfb3e9 (patch)
treeee5984f87835f992c61d6d81101d87394d3cb939
parent8048a97d9e6bd965717555bd7ce9fe6520012eb2 (diff)
downloadlibgphoto2-99dc0ee0abe1908a0b59b62d8733445f84dfb3e9.tar.gz
strncpy(x,y,strlen(y)) will leave out \0
git-svn-id: https://svn.code.sf.net/p/gphoto/code/branches/libgphoto2-2_4/libgphoto2@14037 67ed7778-7388-44ab-90cf-0a291f65f57c
-rw-r--r--camlibs/canon/canon.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/camlibs/canon/canon.c b/camlibs/canon/canon.c
index 0f19b4a87..b42bffb23 100644
--- a/camlibs/canon/canon.c
+++ b/camlibs/canon/canon.c
@@ -1333,8 +1333,7 @@ void canon_int_find_new_image ( Camera *camera, unsigned char *initial_state, un
if ( is_image ( new_name ) ) {
/* Yup, we'll assume that this is the new image. */
GP_DEBUG ( " Found our new image file" );
- strncpy ( path->name, new_name,
- strlen ( new_name ) );
+ strcpy ( path->name, new_name );
strcpy ( path->folder, canon2gphotopath ( camera, path->folder ) );
/* FIXME: Marcus: make it less large effort... */