зеркало из https://github.com/mozilla/gecko-dev.git
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
This commit is contained in:
Родитель
dd955b19e7
Коммит
0f1c6a1f28
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче