Fixed potential truncation.
This commit is contained in:
parent
3e42fa28df
commit
5f948d0d96
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
char *buf = new char[8]();
|
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;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue