]>
Commit | Line | Data |
---|---|---|
bfc879b9 ER |
1 | diff -Naurd build-tree.orig/apache_1.3.34/src/support/htdigest.c build-tree/apache_1.3.34/src/support/htdigest.c |
2 | --- build-tree.orig/apache_1.3.34/src/support/htdigest.c 2004-05-15 08:34:22.000000000 +0200 | |
3 | +++ build-tree/apache_1.3.34/src/support/htdigest.c 2004-05-15 08:35:14.000000000 +0200 | |
4 | @@ -124,7 +124,8 @@ | |
5 | fprintf(f, "%s:%s:", user, realm); | |
6 | ||
7 | /* Do MD5 stuff */ | |
8 | - sprintf(string, "%s:%s:%s", user, realm, pw); | |
9 | + memset(string, '\0',sizeof(string)); | |
10 | + snprintf(string, sizeof(string)-1, "%s:%s:%s", user, realm, pw); | |
11 | ||
12 | ap_MD5Init(&context); | |
13 | ap_MD5Update(&context, (unsigned char *) string, strlen(string)); | |
14 | @@ -241,11 +242,13 @@ | |
15 | } | |
16 | fclose(f); | |
17 | fclose(tfp); | |
18 | + | |
19 | + memset(command,'\0', sizeof(command)); | |
20 | #ifndef NETWARE | |
21 | #if defined(OS2) || defined(WIN32) | |
22 | - sprintf(command, "copy \"%s\" \"%s\"", tn, argv[1]); | |
23 | + snprintf(command, sizeof(command)-1, "copy \"%s\" \"%s\"", tn, argv[1]); | |
24 | #else | |
25 | - sprintf(command, "cp %s %s", tn, argv[1]); | |
26 | + snprintf(command, sizeof(command)-1, "cp %s %s", tn, argv[1]); | |
27 | #endif | |
28 | system(command); | |
29 | #else |