We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d796615 + e77a5d7 commit 77edcebCopy full SHA for 77edceb
1 file changed
Source/bmalloc/bmalloc/Mutex.cpp
@@ -31,6 +31,7 @@
31
#include <mach/mach_traps.h>
32
#include <mach/thread_switch.h>
33
#endif
34
+#include <cstring>
35
#include <thread>
36
#include <unistd.h>
37
@@ -46,7 +47,7 @@ static inline void yield()
46
47
static std::once_flag onceFlag;
48
std::call_once(onceFlag, [] {
49
const char* env = getenv("WEBKIT_WPE_BMALLOC_MICROSECONDS_SLEEP");
- if (env) {
50
+ if (env && env[strnlen(env, 5)] == '\0') {
51
int value;
52
if (sscanf(env, "%d", &value) == 1 && value > 0)
53
bmallocMicrosecondsSleep = value;
0 commit comments