git-svn: trunk@3102
Nigel Horne authored on 2007/06/19 03:57:57... | ... |
@@ -1,3 +1,7 @@ |
1 |
+Mon Jun 18 19:30:15 BST 2007 (njh) |
|
2 |
+---------------------------------- |
|
3 |
+ * libclamav/pdf.c: Remove compilation warnings on some Linux |
|
4 |
+ |
|
1 | 5 |
Sun Jun 17 22:23:35 CEST 2007 (acab) |
2 | 6 |
------------------------------------ |
3 | 7 |
* libclamav/pe.c: minor typo in wwpack32 |
... | ... |
@@ -20,7 +24,7 @@ Sat Jun 09 23:16:00 EEST 2007 (edwin) |
20 | 20 |
|
21 | 21 |
Sat Jun 09 18:37:00 EEST 2007 (edwin) |
22 | 22 |
------------------------------------ |
23 |
- * libclamav/regex_list.c: first draft of new implementation for regex_list.c |
|
23 |
+ * libclamav/regex_list.c: first draft of new implementation for regex_list.c |
|
24 | 24 |
|
25 | 25 |
Thu May 31 17:43:10 EEST 2007 (edwin) |
26 | 26 |
------------------------------------ |
... | ... |
@@ -110,7 +114,7 @@ Sat May 26 11:34:19 BST 2007 (njh) |
110 | 110 |
Sat May 26 12:45:00 EEST 2007 (edwin) |
111 | 111 |
---------------------------------- |
112 | 112 |
* libclamav/regex_list.c: cli_realloc() for matcher->root_hosts |
113 |
- |
|
113 |
+ |
|
114 | 114 |
Sat May 26 00:31:10 CEST 2007 (tk) |
115 | 115 |
---------------------------------- |
116 | 116 |
* libclamav: fix some possible error path leaks by changing cli_realloc() |
... | ... |
@@ -36,6 +36,9 @@ static char const rcsid[] = "$Id: pdf.c,v 1.61 2007/02/12 20:46:09 njh Exp $"; |
36 | 36 |
#ifdef HAVE_LIMITS_H |
37 | 37 |
#include <limits.h> |
38 | 38 |
#endif |
39 |
+#ifdef HAVE_UNISTD_H |
|
40 |
+#include <unistd.h> |
|
41 |
+#endif |
|
39 | 42 |
|
40 | 43 |
#ifdef HAVE_SYS_MMAN_H |
41 | 44 |
#include <sys/mman.h> |
... | ... |
@@ -466,11 +469,11 @@ cli_pdf(const char *dir, int desc, const cli_ctx *ctx) |
466 | 466 |
continue; |
467 | 467 |
} |
468 | 468 |
if(ret) { |
469 |
- char *t; |
|
469 |
+ unsigned char *t; |
|
470 | 470 |
|
471 | 471 |
real_streamlen = ret; |
472 | 472 |
/* free unused trailing bytes */ |
473 |
- t = cli_realloc(tmpbuf, |
|
473 |
+ t = (unsigned char *)cli_realloc(tmpbuf, |
|
474 | 474 |
calculated_streamlen); |
475 | 475 |
if(t == NULL) { |
476 | 476 |
free(tmpbuf); |