aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine_p.h
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2022-10-12 09:02:40 +0200
committerFabian Kosmale <fabian.kosmale@qt.io>2022-10-13 17:27:21 +0000
commit0e963a53c04b0dbe172cfb495b4d62dc8e2f31a3 (patch)
treeb0e579135c7949e2ca504696888f1d1fb24e91ac /src/qml/jsruntime/qv4engine_p.h
parent4181f87c5ef41793ea257a42a6b29ed24b542f26 (diff)
QV4: Avoid memory corruption in Reflect.apply
This extracts the check from Function.prototype.apply into a shared function, and uses it in Reflect.apply, which has the same issue. Pick-to: 6.4 6.2 5.15 Task-number: QTBUG-107619 Change-Id: I899464c86554f9bbb5270a95bbe3fe27531e9a27 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine_p.h')
-rw-r--r--src/qml/jsruntime/qv4engine_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index e6471e796d..06c6f5eeff 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -651,6 +651,7 @@ public:
int maxGCStackSize() const;
bool checkStackLimits();
+ int safeForAllocLength(qint64 len64);
bool canJIT(Function *f = nullptr)
{