QNdefNfcTextRecord::setLocale(): truncate locale if its size exceeds 63


The language code length field in the nfc text record status byte is
6 bits wide, allowing a maximum of 63 bytes. If a longer locale was
passed, the size field would overflow into the encoding flag and RFU bit
corrupting the record and causing incorrect decoding.

If the locale exceeds 63 bytes, it is now truncated and a warning
is emitted. While the stored locale will be incomplete, the record
structure remains valid. Note that real locale names are short, so
this should not happen in practice

Pick-to: 6.12 6.11 6.8
Change-Id: I8d391e17fc503583fbe1e980a27f9f5b2e3e81fc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
commitafa24d9969575ae03c92d83649615413e9213084
parente30c6a926ff901a025333ddea5cd750cc2f26062
authorRym Bouabid <rym.bouabid@qt.io>
committerRym Bouabid <rym.bouabid@qt.io>
commit timeThu, 18 Jun 2026 14:08:19 +0000