From 4c1fa84d8456303ec4d4513a0cbac8401bfd8033 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 31 Aug 2020 12:10:30 +0200 Subject: remove a useless strncpy call, size is assured before --- camlibs/canon/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/camlibs/canon/usb.c b/camlibs/canon/usb.c index c1d2d5f4a..d61c45576 100644 --- a/camlibs/canon/usb.c +++ b/camlibs/canon/usb.c @@ -2104,7 +2104,7 @@ int canon_usb_set_file_time ( Camera *camera, char *camera_filename, time_t time } memset ( payload, 0, payload_size ); - strncpy ( (char *)payload + 0x4, camera_filename, strlen(camera_filename) ); + strcpy ( (char *)payload + 0x4, camera_filename ); htole32a ( payload, time ); /* Load specified time for camera directory. */ result_buffer = canon_usb_dialogue ( camera, CANON_USB_FUNCTION_SET_FILE_TIME, &bytes_read, payload, payload_size ); -- cgit v1.2.1