From dd52fcee588518ba0910844579cdb58af13e6bab Mon Sep 17 00:00:00 2001
From: Nikias Bassen
Date: Tue, 9 Jan 2024 00:57:34 +0100
Subject: Fix strncpy size

---
 src/libirecovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/libirecovery.c b/src/libirecovery.c
index 5d9d6fa..46566a2 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -2357,7 +2357,7 @@ static void* _irecv_handle_device_add(void *userdata)
 			return NULL;
 		}
 		debug("found device with ECID %016" PRIx64 "\n", (uint64_t)client->device_info.ecid);
-		strncpy(serial_str, client->device_info.serial_string, 256);
+		strncpy(serial_str, client->device_info.serial_string, 255);
 		product_id = client->mode;
 		client_loc.isKIS = 1;
 	}
-- 
cgit v1.1-32-gdbae