From b0839891f8de6abaa239ffb3479c4ada00fcd26e Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 27 Jun 2013 15:24:21 -0400 Subject: [PATCH] apparently a zero crypto tag is valid --- daemon/sdp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daemon/sdp.c b/daemon/sdp.c index 343edab14..05d8d071d 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -325,7 +325,7 @@ static int parse_attribute_ssrc(struct sdp_attribute *output) { /* XXX error handling/logging */ static int parse_attribute_crypto(struct sdp_attribute *output) { - char *start, *end; + char *start, *end, *endp; struct attribute_crypto *c; int salt_key_len, enc_salt_key_len; int b64_state = 0; @@ -344,8 +344,8 @@ static int parse_attribute_crypto(struct sdp_attribute *output) { c = &output->u.crypto; - c->tag = strtoul(c->tag_str.s, NULL, 10); - if (!c->tag) + c->tag = strtoul(c->tag_str.s, &endp, 10); + if (endp == c->tag_str.s) return -1; c->crypto_suite = crypto_find_suite(&c->crypto_suite_str);