Browse code

update

git-svn-id: file:///var/lib/svn/clamav-devel/trunk/clamav-devel@1061 77e5149b-7576-45b1-b177-96237e5ba77b

Tomasz Kojm authored on 2004/11/05 05:49:35
Showing 3 changed files
... ...
@@ -1,3 +1,7 @@
1
+Thu Nov  4 21:47:14 CET 2004 (tk)
2
+---------------------------------
3
+  * libclamav/snprintf.c: fix compilation error (patch by Nigel)
4
+
1 5
 Thu Nov  4 10:14:57 GMT 2004 (njh)
2 6
 ----------------------------------
3 7
   * libclamav/mbox.c:	Applied readdir_r patch from TK
... ...
@@ -254,7 +254,7 @@ void *cli_malloc(size_t size)
254 254
 	void *alloc;
255 255
 
256 256
 
257
-    if(size > MAX_ALLOCATION || size < 0) {
257
+    if(size > MAX_ALLOCATION) {
258 258
 	cli_errmsg("Attempt to allocate %d bytes. Please report to bugs@clamav.net\n", size);
259 259
 	return NULL;
260 260
     }
... ...
@@ -274,7 +274,7 @@ void *cli_calloc(size_t nmemb, size_t size)
274 274
 	void *alloc;
275 275
 
276 276
 
277
-    if(size > MAX_ALLOCATION || size < 0) {
277
+    if(size > MAX_ALLOCATION) {
278 278
 	cli_errmsg("Attempt to allocate %d bytes. Please report to bugs@clamav.net\n", size);
279 279
 	return NULL;
280 280
     }
... ...
@@ -67,7 +67,10 @@
67 67
 
68 68
 #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
69 69
 
70
-static void 
70
+#include <sys/types.h>
71
+#include <stdarg.h>
72
+
73
+static void
71 74
 dopr(char *buffer, size_t maxlen, const char *format, va_list args);
72 75
 
73 76
 static void