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; }