From 8e407cb96e4667164ad6b2b323d8a9cbe970525d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 14 Jun 2024 11:21:46 -0400 Subject: [PATCH] Correct mistake with confluent uuid copy-in in copernicus --- confluent_osdeploy/utils/copernicus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_osdeploy/utils/copernicus.c b/confluent_osdeploy/utils/copernicus.c index 526c06d2..3b92044c 100644 --- a/confluent_osdeploy/utils/copernicus.c +++ b/confluent_osdeploy/utils/copernicus.c @@ -44,11 +44,11 @@ int add_confluent_uuid(char* destination, int maxsize) { int uuidsize; uuidf = open("/confluent_uuid", O_RDONLY); if (uuidf < 0) { return 0; } + strncpy(destination, "/confluentuuid=", maxsize); uuidsize = read(uuidf, destination + 15, maxsize - 15); close(uuidf); if (uuidsize < 0) { return 0; } if (uuidsize > 524288) { return 0; } - strncpy(destination, "/confluentuuid=", maxsize); if (destination[uuidsize + 14] == '\n') { destination[uuidsize + 14] = 0; }