SDP scanner: limit recursion depth in parseAttributeValue()
The patch 0124934456be1040d5887cbb2720d388e4bfb61b fixed the recursion
issues in the BlueZ implementation of the service discovery. However,
that code only parses the data that it receives from the sdpscanner
tool.
This patch addresses the second recursion issue in the tool itself:
when parsing SDP_SEQ{8,16,32} and SDP_ALT{8,16,32} elements, the
function is recursing without any limitation. That could cause stack
overflow in case of malicious SDP records.
The fix is similar to 0124934456be1040d5887cbb2720d388e4bfb61b - limit
the recursion depth to 64 levels.
Task-number: QTBUG-145960
Pick-to: 6.11 6.8 6.5 5.15
Change-Id: Idefaa6e9c5e3abbcd77bbb3203012dcb560d0730
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>