Fixed potential truncation.

This commit is contained in:
XMRig 2019-09-24 00:03:50 +07:00
parent 3e42fa28df
commit 5f948d0d96

View file

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