Commit 88f9cb42 authored by Youness Alaoui's avatar Youness Alaoui

Change variable buffer_len into attribute_len: variable already exists in different scope

parent ae663163
......@@ -102,19 +102,19 @@ stun_usage_ice_conncheck_create (StunAgent *agent, StunMessage *msg,
if (compatibility == STUN_USAGE_ICE_COMPATIBILITY_WLM2009) {
size_t identifier_len = strlen(candidate_identifier);
size_t buffer_len = identifier_len;
size_t attribute_len = identifier_len;
int modulo4 = identifier_len % 4;
uint8_t* buf;
if (modulo4)
buffer_len += 4 - modulo4;
attribute_len += 4 - modulo4;
buf = malloc(buffer_len);
memset(buf, 0, buffer_len);
buf = malloc(attribute_len);
memset(buf, 0, attribute_len);
memcpy(buf, candidate_identifier, identifier_len);
val = stun_message_append_bytes (msg, STUN_ATTRIBUTE_CANDIDATE_IDENTIFIER,
buf, buffer_len);
buf, attribute_len);
free(buf);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment