BlueZ: limit recursion when parsing SDP records


The implementation could recurse infinitely when parsing the "sequence"
elements of the service entry.

Limit the recursion by introducing a kMaxSdpRecursionDepth constant.
It is added as a static class-level variable, because it should also
be reused in the Windows implementation that has the same problem.

Add a unit-test to verify that the recursion limit works in practice.
Since this is a private API, enable this test only in developer build.
That is achieved by using Q_AUTOTEST_EXPORT and QT_BUILD_INTERNAL.

Task-number: QTBUG-145960
Pick-to: 6.11 6.8 6.5 5.15
Change-Id: I6dc3f79543dc2da6bf19927dca2edd1ae707c304
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
commit0124934456be1040d5887cbb2720d388e4bfb61b
parentbf282f6a62c4984b090b1ab12ac50ee3327ed534
authorIvan Solovev <ivan.solovev@qt.io>
committerIvan Solovev <ivan.solovev@qt.io>
commit timeFri, 24 Apr 2026 06:58:53 +0000