Skip to content
Snippets Groups Projects
Commit 0f1c6a1f authored by David Major's avatar David Major
Browse files

Bug 1646171 - Fix vsnprintf complaint in Assertions.cpp r=froydnj

For some reason, our clang-plugin didn't notice this before clang 11.

Differential Revision: https://phabricator.services.mozilla.com/D79901
parent dd955b19
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,7 @@
#include "mozilla/Assertions.h"
#include "mozilla/Atomics.h"
#include "mozilla/Sprintf.h"
#include <stdarg.h>
......@@ -34,8 +35,7 @@ MFBT_API MOZ_COLD MOZ_NEVER_INLINE MOZ_FORMAT_PRINTF(1, 2) const
}
va_list aArgs;
va_start(aArgs, aFormat);
int ret =
vsnprintf(sPrintfCrashReason, sPrintfCrashReasonSize, aFormat, aArgs);
int ret = VsprintfLiteral(sPrintfCrashReason, aFormat, aArgs);
va_end(aArgs);
MOZ_RELEASE_ASSERT(
ret >= 0 && size_t(ret) < sPrintfCrashReasonSize,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment