Diff between eef50fbbf032525f1a5a77bd1d92b70d8825ac47 and 5f12d7a3da6869bb25154d594c5d9503b33cbe6c

Changed Files

File Additions Deletions Status
lib/sdp.c +8 -3 modified

Full Patch

diff --git a/lib/sdp.c b/lib/sdp.c
index 1f19953..2107e28 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -4181,10 +4181,15 @@ int sdp_process(sdp_session_t *session)
 		goto end;
 	}
 
-	if (n == 0 || reqhdr->tid != rsphdr->tid ||
-		(n != (int) (ntohs(rsphdr->plen) + sizeof(sdp_pdu_hdr_t)))) {
+	if (reqhdr->tid != rsphdr->tid) {
 		t->err = EPROTO;
-		SDPERR("Protocol error.");
+		SDPERR("Protocol error: transaction id does not match");
+		goto end;
+	}
+
+	if (n != (int) (ntohs(rsphdr->plen) + sizeof(sdp_pdu_hdr_t))) {
+		t->err = EPROTO;
+		SDPERR("Protocol error: invalid length");
 		goto end;
 	}