Mon Sep 5 18:40:22 CEST 2005 Jochen Eisinger <c0ffee@penguin-breeder.org>
authorJochen Eisinger <coffee@silcnet.org>
Mon, 5 Sep 2005 16:41:45 +0000 (16:41 +0000)
committerJochen Eisinger <coffee@silcnet.org>
Mon, 5 Sep 2005 16:41:45 +0000 (16:41 +0000)
* mkstemp returns -1 on error, thanks to brad@comstyle.com for
  pointing this out.  Affected file apps/silcd/silcd.c

CHANGES
apps/silcd/silcd.c

diff --git a/CHANGES b/CHANGES
index ee11e78b1483e3036d7359db9e05d39c0c1d11d5..551b7bcd8007b60b2d9092d20ad1cae793d19f4b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+Mon Sep  5 18:40:22 CEST 2005  Jochen Eisinger <c0ffee@penguin-breeder.org>
+
+       * mkstemp returns -1 on error, thanks to brad@comstyle.com for
+         pointing this out.  Affected file apps/silcd/silcd.c
+
 Fri Sep  2 23:44:37 CEST 2005  Jochen Eisinger <c0ffee@penguin-breeder.org>
 
        * Fixed the insecure temporary file creation issue now that it's
index a727f2a90bfb0ae072c590bb72e0b69ecd16ec9b..7d5d3beb960e525a2b04429eef6c91dfbe27072c 100644 (file)
@@ -266,7 +266,7 @@ SILC_TASK_CALLBACK(dump_stats)
   memset(filename, 0, sizeof(filename));
   snprintf(filename, sizeof(filename) - 1, "/tmp/silcd.%d.stats-XXXXXX", getpid());
   fdd = mkstemp(filename);
-  if (!fdd)
+  if (fdd == -1)
     return;
 
 #define STAT_OUTPUT(fmt, stat) fprintf(fdd, fmt "\n", (int)stat);