Browse Source

apparently a zero crypto tag is valid

git.mgm/mediaproxy-ng/github/master
Richard Fuchs 13 years ago
parent
commit
b0839891f8
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      daemon/sdp.c

+ 3
- 3
daemon/sdp.c View File

@ -325,7 +325,7 @@ static int parse_attribute_ssrc(struct sdp_attribute *output) {
/* XXX error handling/logging */ /* XXX error handling/logging */
static int parse_attribute_crypto(struct sdp_attribute *output) { static int parse_attribute_crypto(struct sdp_attribute *output) {
char *start, *end;
char *start, *end, *endp;
struct attribute_crypto *c; struct attribute_crypto *c;
int salt_key_len, enc_salt_key_len; int salt_key_len, enc_salt_key_len;
int b64_state = 0; int b64_state = 0;
@ -344,8 +344,8 @@ static int parse_attribute_crypto(struct sdp_attribute *output) {
c = &output->u.crypto; 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; return -1;
c->crypto_suite = crypto_find_suite(&c->crypto_suite_str); c->crypto_suite = crypto_find_suite(&c->crypto_suite_str);


Loading…
Cancel
Save