From 66ee42e6e379f76fa9c008d39b83e8aed8e7994d Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sat, 14 May 2005 12:58:15 +0000 Subject: [PATCH] * g3.c: fixed buffer overflow by incorrect strcpy()s git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@8000 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/ricoh/g3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/camlibs/ricoh/g3.c b/camlibs/ricoh/g3.c index ecae1ee5f..b8ca9899c 100644 --- a/camlibs/ricoh/g3.c +++ b/camlibs/ricoh/g3.c @@ -766,9 +766,9 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list, char xfn[13]; int date, time, month, year; - strcpy(xfn, buf+n*32); + strncpy (xfn, buf+n*32, 8); xfn[8] = '.'; - strcpy(xfn+9, buf+n*32+8); + strncpy (xfn+9, buf+n*32+8, 3); xfn[8+1+3] = '\0'; ret = gp_filesystem_append (fs, folder, xfn, context);