diff -u -Nur --exclude CVS build-tree.orig/apache_1.3.26/src/support/htdigest.c build-tree/apache_1.3.26/src/support/htdigest.c
--- build-tree.orig/apache_1.3.26/src/support/htdigest.c	2002-03-13 22:05:37.000000000 +0100
+++ build-tree/apache_1.3.26/src/support/htdigest.c	2002-10-22 20:57:59.000000000 +0200
@@ -94,7 +94,7 @@
 
 #define MAX_STRING_LEN 256
 
-char *tn;
+static char tn[MAX_STRING_LEN];
 
 
 static void getword(char *word, char *line, char stop)
@@ -216,8 +216,8 @@
     char x[MAX_STRING_LEN];
     char command[MAX_STRING_LEN];
     int found;
+    int tfd;
 
-    tn = NULL;
     signal(SIGINT, (void (*)(int)) interrupted);
     if (argc == 5) {
 	if (strcmp(argv[1], "-c"))
@@ -241,11 +241,13 @@
     else if (argc != 4)
 	usage();
 
-    tn = tmpnam(NULL);
-    if (!(tfp = fopen(tn, "w"))) {
+    strcpy(tn, "/tmp/htdigest-XXXXXX");
+    tfd = mkstemp(tn);
+    if (tfd == -1) {
 	fprintf(stderr, "Could not open temp file.\n");
 	exit(1);
     }
+    tfp = fdopen(tfd, "w");
 
     if (!(f = fopen(argv[1], "r"))) {
 	fprintf(stderr,
