libclamav/pdf.c: fix write error with specific files (bb#1181)

git-svn: trunk@4173
0.95
Tomasz Kojm 17 years ago
parent 15d67313c4
commit b17efc993a
  1. 4
      ChangeLog
  2. 8
      libclamav/pdf.c

@ -1,3 +1,7 @@
Thu Sep 11 21:46:48 CEST 2008 (tk)
----------------------------------
* libclamav/pdf.c: fix write error with specific files (bb#1181)
Thu Sep 11 13:16:22 EEST 2008 (edwin)
-------------------------------------
* build system: allow 'make check' to work even if check is not installed

@ -401,13 +401,15 @@ cli_pdf(const char *dir, int desc, cli_ctx *ctx, off_t offset)
calculated_streamlen = (int)(streamend - streamstart);
real_streamlen = length;
if(calculated_streamlen != real_streamlen)
cli_dbgmsg("cli_pdf: Incorrect Length field in file attempting to recover\n");
cli_dbgmsg("cli_pdf: length %lu, calculated_streamlen %lu isFlate %d isASCII85 %d\n",
length, calculated_streamlen,
is_flatedecode, is_ascii85decode);
if(calculated_streamlen != real_streamlen) {
cli_dbgmsg("cli_pdf: Incorrect Length field in file attempting to recover\n");
if(real_streamlen > calculated_streamlen)
real_streamlen = calculated_streamlen;
}
#if 0
/* FIXME: this isn't right... */
if(length)

Loading…
Cancel
Save