Skip to content

Commit c521a00

Browse files
committed
fix(runtime/uuid): use 'snprintf'
1 parent 30f4fa8 commit c521a00

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/runtime/uuid/v7.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ namespace ssc::runtime::uuid {
2525
part2 |= 0x8000000000000000ull;
2626

2727

28-
sprintf(
28+
snprintf(
2929
buffer,
30+
37,
3031
"%08x-%04x-%04x-%02x%02x-%012llx",
3132
(uint32_t) (part1 >> 32),
3233
(uint16_t) (part1 >> 16),
@@ -39,7 +40,7 @@ namespace ssc::runtime::uuid {
3940

4041
String v7 () {
4142
String output;
42-
output.resize(36);
43+
output.resize(37);
4344
v7(output.data());
4445
return output;
4546
}

0 commit comments

Comments
 (0)