Skip to content

Commit

Permalink
Clear out trailing part of the buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Oct 31, 2015
1 parent 6aecbff commit 6bae92d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pam_radius_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ static void add_password(AUTH_HDR *request, unsigned char type, CONST char *pass
length &= ~(AUTH_PASS_LEN - 1); /* chop it off */
} /* 16*N maps to itself */

memset(hashed, 0, length);
memcpy(hashed, password, length);
memset(hashed + length, 0, sizeof(hashed) - length);

attr = find_attribute(request, PW_PASSWORD);

Expand Down

0 comments on commit 6bae92d

Please sign in to comment.