From 5f948d0d96d63696663e7fff286a5bbc314a36cd Mon Sep 17 00:00:00 2001 From: XMRig Date: Tue, 24 Sep 2019 00:03:50 +0700 Subject: [PATCH] Fixed potential truncation. --- src/backend/common/misc/PciTopology.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/common/misc/PciTopology.h b/src/backend/common/misc/PciTopology.h index 4f362bc4..ce33ebdb 100644 --- a/src/backend/common/misc/PciTopology.h +++ b/src/backend/common/misc/PciTopology.h @@ -54,7 +54,7 @@ public: } char *buf = new char[8](); - snprintf(buf, 8, "%02x:%02x.%01x", bus(), device(), function()); + snprintf(buf, 8, "%02hhx:%02hhx.%01hhx", bus(), device(), function()); return buf; }