From 3bb5e94d654acae88aef0efef908459a054cd45a Mon Sep 17 00:00:00 2001 From: Ralph Little Date: Sat, 21 Dec 2019 20:57:48 -0800 Subject: [PATCH] artec: strncpy replaced with memcpy() This was a cheeky strncpy hiding what is really the job of memcpy(). --- backend/artec.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/artec.c b/backend/artec.c index 2ba8d6dad..395b4f1b9 100644 --- a/backend/artec.c +++ b/backend/artec.c @@ -1999,8 +1999,8 @@ attach (const char *devname, ARTEC_Device ** devp) DBG (6, "Found BlackWidow BW4800SP scanner, setting up like AT3\n"); /* setup the vendor and product to mimic the Artec/Ultima AT3 */ - strncpy (result + 8, "ULTIMA", 6); - strncpy (result + 16, "AT3 ", 16); + memcpy (result + 8, "ULTIMA", 6); + memcpy (result + 16, "AT3 ", 16); } /* @@ -2013,8 +2013,8 @@ attach (const char *devname, ARTEC_Device ** devp) DBG (6, "Found Plustek 19200S scanner, setting up like AM12S\n"); /* setup the vendor and product to mimic the Artec/Ultima AM12S */ - strncpy (result + 8, "ULTIMA", 6); - strncpy (result + 16, "AM12S ", 16); + memcpy (result + 8, "ULTIMA", 6); + memcpy (result + 16, "AM12S ", 16); } /*