summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2013-02-15 11:07:50 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2013-02-18 10:00:33 +0200
commit67c7f0bf9b0c5d7023c60fdd4b0b287c212922e4 (patch)
tree9ca00326e8a941561efd4d1cbbd7615a16c335ab /lib
parent429cee00a556a774507a706f32dbfa840bffef62 (diff)
lib: Add missing DTD validation in sdp_record_print()
Diffstat (limited to 'lib')
-rw-r--r--lib/sdp.c6
1 files 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);
}