INN commit: branches/2.5/storage/cnfs (cnfs.c)

INN Commit rra at isc.org
Sat May 23 11:36:26 UTC 2015


    Date: Saturday, May 23, 2015 @ 04:36:25
  Author: iulius
Revision: 9874

storage/cnfs/cnfs.c:  don't read uninitialised cycbuffname

Thanks to Richard Kettlewell for the patch.

Modified:
  branches/2.5/storage/cnfs/cnfs.c

--------+
 cnfs.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Modified: cnfs.c
===================================================================
--- cnfs.c	2015-05-23 11:35:34 UTC (rev 9873)
+++ cnfs.c	2015-05-23 11:36:25 UTC (rev 9874)
@@ -123,9 +123,13 @@
     uint32_t	uint32;
 
     if (cycbuffname == NULL || blk == NULL || cycnum == NULL) {
-        warn("CNFS: BreakToken: invalid argument: %s", cycbuffname);
-	SMseterror(SMERR_INTERNAL, "BreakToken: invalid argument");
-	return false;
+        if (cycbuffname == NULL) {
+            warn("CNFS: BreakToken: invalid argument");
+        } else {
+            warn("CNFS: BreakToken: invalid argument: %s", cycbuffname);
+        }
+        SMseterror(SMERR_INTERNAL, "BreakToken: invalid argument");
+        return false;
     }
     memcpy(cycbuffname, token.token, CNFSMAXCYCBUFFNAME);
     *(cycbuffname + CNFSMAXCYCBUFFNAME) = '\0';	/* Just to be paranoid */



More information about the inn-committers mailing list