fuzz: Avoid unsigned integer overflow in FormatParagraph

This commit is contained in:
MarcoFalke
2022-02-09 14:38:56 +01:00
parent 8ac79973f8
commit fa2f7d0059
2 changed files with 3 additions and 1 deletions

View File

@@ -328,6 +328,7 @@ bool ParseUInt64(const std::string& str, uint64_t* out)
std::string FormatParagraph(const std::string& in, size_t width, size_t indent)
{
assert(width >= indent);
std::stringstream out;
size_t ptr = 0;
size_t indented = 0;