return NULL;
}
strncpy(name, token, 64);
+ name[63] = '\0';
type = get_token(fp, token);
if (type == OBJTYPE) {
if (root == NULL) {
/* The password field, for the MD5 hash, needs to be 8 bytes and NUL padded. */
memset(pwd, 0, sizeof(pwd));
strncpy(pwd, password, sizeof(pwd));
+ pwd[sizeof(pwd) - 1] = '\0';
ws = (struct wccp2_security_md5_t *) ptr;
assert(ntohs(ws->security_type) == WCCP2_SECURITY_INFO);
/* The password field, for the MD5 hash, needs to be 8 bytes and NUL padded. */
memset(pwd, 0, sizeof(pwd));
strncpy(pwd, srv->wccp_password, sizeof(pwd));
+ pwd[sizeof(pwd) - 1] = '\0';
/* Take a copy of the challenge: we need to NUL it before comparing */
memcpy(md5_challenge, ws->security_implementation, 16);