From 5f682c5a7158cd757f67255736d01157405ab3e6 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sun, 23 Oct 2022 18:26:49 +0200 Subject: [PATCH] [xhr] false when init_string fails --- src/ecmascript/spidermonkey/xhr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ecmascript/spidermonkey/xhr.cpp b/src/ecmascript/spidermonkey/xhr.cpp index 305cb414..89cb4163 100644 --- a/src/ecmascript/spidermonkey/xhr.cpp +++ b/src/ecmascript/spidermonkey/xhr.cpp @@ -825,6 +825,7 @@ xhr_send(JSContext *ctx, unsigned int argc, JS::Value *rval) struct string post; if (!init_string(&post)) { mem_free(body); + return false; } add_to_string(&post, "text/plain\n");