Commit 8d515d85 authored by Jens Stutte's avatar Jens Stutte Committed by Pier Angelo Vendrame
Browse files

Bug 2025942 - Fix off-by-one in a LogModuleManager::PrintFmt check. r=xpcom-reviewers,emilio

parent 53f019c7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -600,7 +600,7 @@ class LogModuleManager {
    charsWritten = size;

    // We may have maxed out, allocate a buffer and re-format
    if (charsWritten > kBuffSize) {
    if (charsWritten >= kBuffSize) {
      allocatedBuff = MakeUnique<char[]>(charsWritten + 1);  // + final \0
      auto [out, size] =
          fmt::vformat_to_n(allocatedBuff.get(), charsWritten, aFmt, aArgs);