Diff between 375d02473fb7f8b90e39bc79001ab6f97a81bd3b and 7641fc83a9a790b761b0c14852156a6651b7fc34
Changed Files
| File | Additions | Deletions | Status |
| src/sdpd-server.c | +1 | -1 | modified |
Full Patch
diff --git a/src/sdpd-server.c b/src/sdpd-server.c
index c863508..54de393 100644
--- a/src/sdpd-server.c
+++ b/src/sdpd-server.c
@@ -164,7 +164,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 != sizeof(sdp_pdu_hdr_t)) {
+ if (len < 0 || (unsigned int) len < sizeof(sdp_pdu_hdr_t)) {
sdp_svcdb_collect_all(sk);
return FALSE;
}