summaryrefslogtreecommitdiffstats
path: root/lib/libsdp/search.c
diff options
context:
space:
mode:
authoremax <emax@FreeBSD.org>2004-02-26 20:44:55 +0000
committeremax <emax@FreeBSD.org>2004-02-26 20:44:55 +0000
commit58a98b5bd1671c30f49bae2eadb70fb996c4ac0b (patch)
tree7ca01c942fd62cbbffb4181891ee7ede1761b5c5 /lib/libsdp/search.c
parent72bc38c826a05591a917647bfc8af407577d7664 (diff)
downloadFreeBSD-src-58a98b5bd1671c30f49bae2eadb70fb996c4ac0b.zip
FreeBSD-src-58a98b5bd1671c30f49bae2eadb70fb996c4ac0b.tar.gz
Add extra sanity check for SDP packets in libsdp(3)
Fix yet another endianess bug in sdpd(8)
Diffstat (limited to 'lib/libsdp/search.c')
-rw-r--r--lib/libsdp/search.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libsdp/search.c b/lib/libsdp/search.c
index 42f162d..20fc7e3 100644
--- a/lib/libsdp/search.c
+++ b/lib/libsdp/search.c
@@ -167,6 +167,7 @@ sdp_search(void *xss,
if (xpdu.pdu.pid == SDP_PDU_ERROR_RESPONSE ||
xpdu.pdu.tid != ss->tid ||
+ xpdu.pdu.len > len ||
xpdu.len > xpdu.pdu.len) {
ss->error = EIO;
return (-1);
OpenPOWER on IntegriCloud