summaryrefslogtreecommitdiffstats
path: root/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/main.cpp
blob: bc5449e51ee1987a61523f6abca8402d60e0c698 (plain)
1
2
3
4
5
6
7
8
9
10
11
// Copyright (C) 2018 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#include <QXmlStreamReader>

extern "C" int LLVMFuzzerTestOneInput(const char *Data, size_t Size) {
    QXmlStreamReader reader(QByteArray::fromRawData(Data, Size));
    while (!reader.atEnd())
        reader.readNext();
    return 0;
}