diff options
author | Robert Loehning <robert.loehning@qt.io> | 2019-11-12 11:26:39 +0100 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2019-11-13 11:38:33 +0100 |
commit | 34d1b179256706111703e557cd1d86b6f9a2180a (patch) | |
tree | 321ff51b311193be512b59aa6d61ea3cf3551b97 /tests/libfuzzer/qml/jsapi | |
parent | f15c2c22cb677677ccf8aacb2603fcf774d13584 (diff) |
Fuzzing: Don't copy input data to QByteArray
Change-Id: I1c83b2da19f9d73e4069ecb1f85af71e2ac2b96b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/libfuzzer/qml/jsapi')
-rw-r--r-- | tests/libfuzzer/qml/jsapi/evaluate/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libfuzzer/qml/jsapi/evaluate/main.cpp b/tests/libfuzzer/qml/jsapi/evaluate/main.cpp index 9e90ba7cbd..82b9847bca 100644 --- a/tests/libfuzzer/qml/jsapi/evaluate/main.cpp +++ b/tests/libfuzzer/qml/jsapi/evaluate/main.cpp @@ -32,7 +32,7 @@ // libfuzzer test for QJSEngine::evaluate() extern "C" int LLVMFuzzerTestOneInput(const char *Data, size_t Size) { - const QByteArray ba(Data, Size); + const QByteArray ba = QByteArray::fromRawData(Data, Size); // avoid potential endless loops if (ba.contains("for") || ba.contains("while")) return 1; |