summaryrefslogtreecommitdiffstats
path: root/src/corelib/serialization/qjson_p.h
Commit message (Collapse)AuthorAgeFilesLines
* QString: add a method to do a conversion to Latin1 without checkingThiago Macieira2018-05-151-25/+7
| | | | | | | | | | | If the input is already known to be Latin 1, we don't need to check and merge in question marks. QJsonObject already needed this code, now we can make it more efficient. I'll need the same code in CBOR. Change-Id: Ib48364abee9f464c96c6fffd152e508f078404e5 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* QJsonDocument::fromRawData: Fix out-of-bounds accessJüri Valdmann2018-05-041-1/+1
| | | | | | | | | | | | | | This method takes a pointer+size pair, but begins reading through the pointer without first checking the size parameter. Fixed by checking the size parameter. A new test case is added with an empty binary json file. Although the test does not fail under normal conditions, the problem can be detected using valgrind or AddressSanitizer. Task-number: QTBUG-61969 Change-Id: Ie91cc9a56dbc3c676472c614d4e633d7721b8481 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* JSON: use the new isLatin1 functionThiago Macieira2018-01-271-8/+1
| | | | | | | It's vectorized, so it should be faster than this version. Change-Id: I56b444f9d6274221a3b7fffd150c1519eb999cdc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Create corelib/serialization and move existing file formats into itThiago Macieira2018-01-261-0/+781
This is in preparation to adding CBOR support. We don't need yet another dir for CBOR and placing it in src/corelib/json is just wrong. Change-Id: I9741f017961b410c910dfffd14ffb9d870340fa6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>