summaryrefslogtreecommitdiff
path: root/libgphoto2_port/serial
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2006-10-26 08:41:08 +0000
committerMarcus Meissner <marcus@jet.franken.de>2006-10-26 08:41:08 +0000
commit8d5a03054272a10ccb7775ab05ddfa45e7319a97 (patch)
treeab0e245b08bef5c507466bdebd8c71a588d0839b /libgphoto2_port/serial
parent14ff19e5c89f646c5068204664695e657a8c283c (diff)
downloadlibgphoto2-8d5a03054272a10ccb7775ab05ddfa45e7319a97.tar.gz
fixed 3rd argument to strncat() (should be leftover length instead of
full length) git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9375 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2_port/serial')
-rw-r--r--libgphoto2_port/serial/unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgphoto2_port/serial/unix.c b/libgphoto2_port/serial/unix.c
index 831ff4bdc..355ad869c 100644
--- a/libgphoto2_port/serial/unix.c
+++ b/libgphoto2_port/serial/unix.c
@@ -366,7 +366,7 @@ gp_port_library_list (GPPortInfoList *list)
gp_port_serial_unlock (NULL, path);
info.type = GP_PORT_SERIAL;
strncpy (info.path, "serial:", sizeof (info.path));
- strncat (info.path, path, sizeof (info.path));
+ strncat (info.path, path, sizeof (info.path) - strlen (info.path) - 1);
snprintf (info.name, sizeof (info.name),
_("Serial Port %i"), x);
CHECK (gp_port_info_list_append (list, info));