warnings in pdf and tar

git-svn: trunk@3632
remotes/push_mirror/metadata
aCaB 18 years ago
parent d0d1afd7c7
commit 965220979f
  1. 4
      ChangeLog
  2. 12
      libclamav/pdf.c
  3. 1
      libclamav/untar.c

@ -1,3 +1,7 @@
Thu Feb 14 16:25:11 CET 2008 (acab)
-----------------------------------
* libclamav: fix warnings in pdf and untar
Thu Feb 14 15:33:22 CET 2008 (acab)
-----------------------------------
* libclamav/untar: OTF scan

@ -66,8 +66,8 @@ static char const rcsid[] = "$Id: pdf.c,v 1.61 2007/02/12 20:46:09 njh Exp $";
/*#define SAVE_TMP /* Save the file being worked on in tmp */
#endif
static int try_flatedecode(unsigned char *buf, off_t real_len, off_t calculated_len, int fout, const cli_ctx *ctx);
static int flatedecode(unsigned char *buf, off_t len, int fout, const cli_ctx *ctx);
static int try_flatedecode(unsigned char *buf, off_t real_len, off_t calculated_len, int fout, cli_ctx *ctx);
static int flatedecode(unsigned char *buf, off_t len, int fout, cli_ctx *ctx);
static int ascii85decode(const char *buf, off_t len, unsigned char *output);
static const char *pdf_nextlinestart(const char *ptr, size_t len);
static const char *pdf_nextobject(const char *ptr, size_t len);
@ -460,7 +460,7 @@ cli_pdf(const char *dir, int desc, cli_ctx *ctx)
if(is_flatedecode)
rc = try_flatedecode((unsigned char *)tmpbuf, real_streamlen, real_streamlen, fout, ctx);
else
rc = cli_writen(fout, (const char *)streamstart, real_streamlen)==real_streamlen ? CL_CLEAN : CL_EIO;
rc = (unsigned long)cli_writen(fout, (const char *)streamstart, real_streamlen)==real_streamlen ? CL_CLEAN : CL_EIO;
}
free(tmpbuf);
} else if(is_flatedecode) {
@ -470,7 +470,7 @@ cli_pdf(const char *dir, int desc, cli_ctx *ctx)
cli_dbgmsg("cli_pdf: writing %lu bytes from the stream\n",
(unsigned long)real_streamlen);
if((rc = cli_checklimits("cli_pdf", ctx, real_streamlen, 0, 0))==CL_CLEAN)
rc = cli_writen(fout, (const char *)streamstart, real_streamlen) == real_streamlen ? CL_CLEAN : CL_EIO;
rc = (unsigned long)cli_writen(fout, (const char *)streamstart, real_streamlen) == real_streamlen ? CL_CLEAN : CL_EIO;
}
if (rc == CL_CLEAN) {
@ -510,7 +510,7 @@ cli_pdf(const char *dir, int desc, cli_ctx *ctx)
* flate inflation - returns clamAV status, e.g CL_SUCCESS, CL_EZIP
*/
static int
try_flatedecode(unsigned char *buf, off_t real_len, off_t calculated_len, int fout, const cli_ctx *ctx)
try_flatedecode(unsigned char *buf, off_t real_len, off_t calculated_len, int fout, cli_ctx *ctx)
{
int ret = cli_checklimits("cli_pdf", ctx, real_len, 0, 0);
@ -539,7 +539,7 @@ try_flatedecode(unsigned char *buf, off_t real_len, off_t calculated_len, int fo
}
static int
flatedecode(unsigned char *buf, off_t len, int fout, const cli_ctx *ctx)
flatedecode(unsigned char *buf, off_t len, int fout, cli_ctx *ctx)
{
int zstat, ret;
off_t nbytes;

@ -43,6 +43,7 @@ static char const rcsid[] = "$Id: untar.c,v 1.35 2007/02/12 20:46:09 njh Exp $";
#include "untar.h"
#include "mbox.h"
#include "blob.h"
#include "scanners.h"
#define BLOCKSIZE 512

Loading…
Cancel
Save