1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00

Fix buffer_printer overflow

This commit is contained in:
Jason Rhinelander 2022-09-09 21:51:34 -03:00
parent f168b7cf72
commit cfd80f6a17
No known key found for this signature in database
GPG key ID: C4992CE7A88D4262

View file

@ -22,7 +22,7 @@ namespace llarp
auto k = i + j;
if (j % 4 == 0)
out.push_back(' ');
if (j >= stop)
if (k >= stop)
out.append(" ");
else
fmt::format_to(ins, "{:02x}", std::to_integer<uint_fast16_t>(b[k]));