From 67c7f0bf9b0c5d7023c60fdd4b0b287c212922e4 Mon Sep 17 00:00:00 2001 From: Anderson Lizardo Date: Fri, 15 Feb 2013 11:07:50 -0400 Subject: lib: Add missing DTD validation in sdp_record_print() --- lib/sdp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/sdp.c b/lib/sdp.c index 9c1eeb5a2..782d9bd32 100644 --- a/lib/sdp.c +++ b/lib/sdp.c @@ -1603,13 +1603,13 @@ static void print_dataseq(sdp_data_t *p) void sdp_record_print(const sdp_record_t *rec) { sdp_data_t *d = sdp_data_get(rec, SDP_ATTR_SVCNAME_PRIMARY); - if (d) + if (d && SDP_IS_TEXT_STR(d->dtd)) printf("Service Name: %.*s\n", d->unitSize, d->val.str); d = sdp_data_get(rec, SDP_ATTR_SVCDESC_PRIMARY); - if (d) + if (d && SDP_IS_TEXT_STR(d->dtd)) printf("Service Description: %.*s\n", d->unitSize, d->val.str); d = sdp_data_get(rec, SDP_ATTR_PROVNAME_PRIMARY); - if (d) + if (d && SDP_IS_TEXT_STR(d->dtd)) printf("Service Provider: %.*s\n", d->unitSize, d->val.str); } -- cgit v1.2.3