OSDN Git Service
(root)
/
android-x86
/
external-bluetooth-bluez.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fd8d071
)
sdp: Check for correct pkt size received instead of error
author
Andrei Emeltchenko
<andrei.emeltchenko@intel.com>
Tue, 1 Oct 2013 11:57:34 +0000
(14:57 +0300)
committer
Johan Hedberg
<johan.hedberg@intel.com>
Wed, 2 Oct 2013 11:11:08 +0000
(14:11 +0300)
Check that the full header is received in recv().
src/sdpd-server.c
patch
|
blob
|
history
diff --git
a/src/sdpd-server.c
b/src/sdpd-server.c
index
7b1351f
..
10e46a1
100644
(file)
--- a/
src/sdpd-server.c
+++ b/
src/sdpd-server.c
@@
-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;
}