* file_ops.c: fixed NDOP to not crash the server if it has trouble
authorArt Cancro <ajc@citadel.org>
Tue, 27 Apr 1999 11:34:11 +0000 (11:34 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 27 Apr 1999 11:34:11 +0000 (11:34 +0000)
  with a download file

citadel/ChangeLog
citadel/file_ops.c

index b054146d7d3e202cc280c53ea88169973c18a15a..bff4fe43b58ef0d544c8ddd70fb5c4ec8fb1d3de 100644 (file)
@@ -1,3 +1,7 @@
+1999-04-27 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
+       * file_ops.c: fixed NDOP to not crash the server if it has trouble
+         with a download file
+
 Mon Apr 26 22:06:57 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
        * Repaired IGnorant security hole blunder re. citmail
 
index 3ebde6db626215244b1fb9c39f5c894301079871..48519eef8b1b5fe809635a323f8dc6e6365e811e 100644 (file)
@@ -670,7 +670,7 @@ void cmd_ndop(char *cmdbuf)
         * zero-length file if it doesn't already exist 
         */
        CC->download_fp = fopen(pathname,"a");
-       fclose(CC->download_fp);
+       if (CC->download_fp != NULL) fclose(CC->download_fp);
 
        /* now open it */
        CC->download_fp = fopen(pathname,"r");