From a39a1864583c5c78fd25fd33b40128062baf727c Mon Sep 17 00:00:00 2001 From: Tarja Sundqvist Date: Thu, 22 Dec 2022 11:11:25 +0200 Subject: Bump version to 5.15.13 Change-Id: I5373d691527246449a9996dc88e27ad169e7bcd3 Reviewed-by: Tarja Sundqvist --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 0b51738b..33171164 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -2,4 +2,4 @@ load(qt_build_config) DEFINES += QT_NO_FOREACH QT_NO_JAVA_STYLE_ITERATORS QT_NO_LINKED_LIST -MODULE_VERSION = 5.15.12 +MODULE_VERSION = 5.15.13 -- cgit v1.2.3 From 13b8696f7493c6343adc15d95489df361379469c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kai=20K=C3=B6hne?= Date: Wed, 31 Aug 2022 09:28:52 +0200 Subject: Doc: Replace dead link to external neard page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-86245 Change-Id: Iaeb6478efce6419c04a9dbe79bef6911e3cfde1c Reviewed-by: Topi Reiniƶ --- src/nfc/doc/src/nfc-index.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nfc/doc/src/nfc-index.qdoc b/src/nfc/doc/src/nfc-index.qdoc index 21f775a6..26e4f637 100644 --- a/src/nfc/doc/src/nfc-index.qdoc +++ b/src/nfc/doc/src/nfc-index.qdoc @@ -35,7 +35,7 @@ The NFC API provides connectivity between NFC enabled devices. Currently the API is supported on \l{Qt for Android}{Android}, -and \l{Qt for Linux/X11}{Linux} using \l {https://01.org/linux-nfc}{Neard} v0.14 or later. +and \l{Qt for Linux/X11}{Linux} using \l {https://github.com/linux-nfc/neard}{Neard} v0.14 or later. \section1 Overview -- cgit v1.2.3 From 092d5f8cbda2d62264626a9a4aab1ecc37a0facb Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Fri, 17 Feb 2023 12:05:17 +0100 Subject: sdpscanner: fix URL processing Do not use the fixed-size temporary buffer, instead just parse the data as a QByteArray. Grepping through BlueZ sources, I could find only several usages of SDP_URL_STR{8,16,32}, and all of them suggest that the url is simply a NULL-terminated string (see [0], [1], [2]). However, the older BlueZ sources suggest that the url can be not NULL-terminated as well (see [3]). To be on a safe side, we provide an implementation that handles both cases correctly. [0]: https://github.com/bluez/bluez/blob/9be85f867856195e16c9b94b605f65f6389eda33/lib/sdp.c#L465 [1]: https://github.com/bluez/bluez/blob/9be85f867856195e16c9b94b605f65f6389eda33/src/sdp-xml.c#L351 [2]: https://github.com/bluez/bluez/blob/9be85f867856195e16c9b94b605f65f6389eda33/tools/sdptool.c#L517 [3]: https://android.googlesource.com/platform/external/bluetooth/bluez/+/master/src/sdp-xml.c#324 Fixes: QTBUG-111242 Change-Id: I22f9521582863fb316dd0b2c49a78928b80a6078 Reviewed-by: Marc Mutz (cherry picked from commit a811bcb3e76e98d480581634b84daf5c8948aceb) Reviewed-by: Qt Cherry-pick Bot --- src/tools/sdpscanner/main.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/tools/sdpscanner/main.cpp b/src/tools/sdpscanner/main.cpp index 7e09ca6e..1df84eba 100644 --- a/src/tools/sdpscanner/main.cpp +++ b/src/tools/sdpscanner/main.cpp @@ -211,9 +211,8 @@ static void parseAttributeValues(sdp_data_t *data, int indentation, QByteArray & case SDP_URL_STR8: case SDP_URL_STR16: case SDP_URL_STR32: - strncpy(snBuffer, data->val.str, data->unitSize - 1); xmlOutput.append("val.str, qstrnlen(data->val.str, data->unitSize)); xmlOutput.append("\"/>\n"); break; default: -- cgit v1.2.3 From c2fa8ee0ca5e1c8e1fe16fc735fd4614435c80a5 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Fri, 17 Feb 2023 17:58:35 +0100 Subject: 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 (cherry picked from commit 58cb7eeea5c05e42efc806716eb5eb39bd25787b) Reviewed-by: Qt Cherry-pick Bot --- src/tools/sdpscanner/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/sdpscanner/main.cpp b/src/tools/sdpscanner/main.cpp index 1df84eba..690f9aaa 100644 --- a/src/tools/sdpscanner/main.cpp +++ b/src/tools/sdpscanner/main.cpp @@ -159,7 +159,9 @@ static void parseAttributeValues(sdp_data_t *data, int indentation, QByteArray & break; } else if (!isprint(text[i])) { hasNonPrintableChar = true; - text.resize(text.indexOf('\0')); // cut trailing content + const auto firstNullIdx = text.indexOf('\0'); + if (firstNullIdx > 0) + text.resize(firstNullIdx); // cut trailing content break; } } -- cgit v1.2.3