summaryrefslogtreecommitdiffstats
path: root/examples/nfc/ndefeditor
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2023-02-17 17:58:35 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-02-18 21:20:05 +0000
commitc2fa8ee0ca5e1c8e1fe16fc735fd4614435c80a5 (patch)
tree2bf5562c2cf2b80f1b457e46564a477b6e273fc3 /examples/nfc/ndefeditor
parent092d5f8cbda2d62264626a9a4aab1ecc37a0facb (diff)
sdpscanner: fix potential unwanted truncation for SDP_TEXT_STR{8,16,32}
QByteArray::resize() treats all negative parameters as a request for a zero length. So the code text.resize(text.indexOf('\0')); can completely erase the text if there is no '\0' in it. Fix it by explicitly checking the return value of QByteArray::indexOf(). Change-Id: Idc42bf4b96a9be5b007916263d6cf1e831b96c07 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit 58cb7eeea5c05e42efc806716eb5eb39bd25787b) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/nfc/ndefeditor')
0 files changed, 0 insertions, 0 deletions