Skip to content

Commit

Permalink
fix(runtime/uuid): use 'snprintf'
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed Feb 10, 2025
1 parent 30f4fa8 commit c521a00
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/runtime/uuid/v7.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ namespace ssc::runtime::uuid {
part2 |= 0x8000000000000000ull;


sprintf(
snprintf(
buffer,
37,
"%08x-%04x-%04x-%02x%02x-%012llx",
(uint32_t) (part1 >> 32),
(uint16_t) (part1 >> 16),
Expand All @@ -39,7 +40,7 @@ namespace ssc::runtime::uuid {

String v7 () {
String output;
output.resize(36);
output.resize(37);
v7(output.data());
return output;
}
Expand Down

0 comments on commit c521a00

Please sign in to comment.