Use snprintf

Change-Id: Iece1320560e0f5a93f47cd67626435266de56ce9
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2020-09-10 17:47:22 +02:00
committed by Hoppe, Mateusz
parent 9aa1eadd11
commit 88ee48498b

View File

@@ -483,7 +483,7 @@ std::string Drm::generateUUID() {
uint64_t parts[2] = {0, 0};
parts[0] = uuid & 0xFFFFFFFFFFFF;
parts[1] = (uuid & 0xFFFF000000000000) >> 48;
sprintf(buffer, uuidString, parts[1], parts[0]);
snprintf(buffer, sizeof(buffer), uuidString, parts[1], parts[0]);
return std::string(buffer, 36);
}