QNdefNfcTextRecord: fix out-of-bounds read in locale() and text()
Return empty qbytearray for malformed or corrupted payloads, as there
is no way to signal that the returned data is incomplete or invalid.
Add autotest. All four cases trip ASAN heap-buffer-overflow without the
fix, and pass cleanly with it.
Fixes: QTBUG-147372
Pick-to: 6.12 6.11 6.8 6.5 5.15
Change-Id: Iac519ff1ee1684bf8eac8a2f35396ba4eefaf6aa
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
| commit | dfa2daa267b6f061820ae6f128568d2558e13a0c |
| parent | 0eecec48c8ba22b28c82c77a4157461ce85fbc4b |
| author | Rym Bouabid <rym.bouabid@qt.io> |
| committer | Rym Bouabid <rym.bouabid@qt.io> |
| commit time | Thu, 18 Jun 2026 14:08:08 +0000 |