max_size = 0;
}
- outdata = htonl(max_size) | sec_layer;
-
/* Allocate the trailer */
trailer = malloc(sizes.cbSecurityTrailer);
if(!trailer)
}
/* Allocate our message */
- messagelen = 4 + strlen(user_name) + 1;
+ messagelen = sizeof(outdata) + strlen(user_name) + 1;
message = malloc(messagelen);
if(!message) {
Curl_safefree(trailer);
terminator. Note: Dispite RFC4752 Section 3.1 stating "The authorization
identity is not terminated with the zero-valued (%x00) octet." it seems
necessary to include it. */
- memcpy(message, &outdata, 4);
- strcpy((char *)message + 4, user_name);
+ outdata = htonl(max_size) | sec_layer;
+ memcpy(message, &outdata, sizeof(outdata));
+ strcpy((char *) message + sizeof(outdata), user_name);
Curl_unicodefree(user_name);
/* Allocate the padding */