libtt: Warning prevention
authorPeter Howkins <flibble@users.sourceforge.net>
Sun, 26 Aug 2012 18:48:55 +0000 (19:48 +0100)
committerPeter Howkins <flibble@users.sourceforge.net>
Sun, 26 Aug 2012 18:48:55 +0000 (19:48 +0100)
One missing stdlib include and one security warning about not
using varargs func correctly.

cde/lib/tt/mini_isam/isbtree.c
cde/lib/tt/mini_isam/iserror.c

index aa1413e74dec44380ca9810d07b1ab5a3eeccf53..65a6d4a22847b3399ad58d90f1b83c566810a0ba 100644 (file)
@@ -40,6 +40,7 @@
  *     B-tree operations: SEARCH
  *     
  */
+#include <stdlib.h>
 
 #include "isam_impl.h"
 
index 58e2c916712b8c841dd1ffcb6bbcdb7aa3b4d429..72d32b9fecba5b2f10b3024076df782ea1f01eb0 100644 (file)
@@ -114,7 +114,7 @@ _isam_warning(msg)
     char       *msg;
 {
     openlog("NetISAM", LOG_PID, LOG_USER);
-    syslog(LOG_ERR, msg);
+    syslog(LOG_ERR, "%s", msg);
 }
 
 /* Set user specified fatal_error handler */