mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-29 23:24:20 +08:00
sdp: Check for correct pkt size received instead of error
Check that the full header is received in recv().
This commit is contained in:
parent
fd8d0713e8
commit
15954a450e
@ -166,7 +166,7 @@ static gboolean io_session_event(GIOChannel *chan, GIOCondition cond, gpointer d
|
||||
}
|
||||
|
||||
len = recv(sk, &hdr, sizeof(sdp_pdu_hdr_t), MSG_PEEK);
|
||||
if (len <= 0) {
|
||||
if (len != sizeof(sdp_pdu_hdr_t)) {
|
||||
sdp_svcdb_collect_all(sk);
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user