Forward port a fix for a pair of potential buffer overflows in htdigest from 1.3

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99680 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Thom May
2003-05-01 13:45:38 +00:00
parent 85d6c41e63
commit 6a917afcdb
2 changed files with 4 additions and 2 deletions

View File

@ -307,8 +307,8 @@ int main(int argc, const char * const argv[])
fprintf(stderr, "Use -c option to create new one.\n");
cleanup_tempfile_and_exit(1);
}
strcpy(user, argv[3]);
strcpy(realm, argv[2]);
apr_cpystrn(user, argv[3], sizeof(user));
apr_cpystrn(realm, argv[2], sizeof(realm));
found = 0;
while (!(get_line(line, MAX_STRING_LEN, f))) {