~ubuntu-branches/ubuntu/feisty/clamav/feisty

« back to all changes in this revision

Viewing changes to libclamav/zziplib/zzip-file.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-04-11 10:27:47 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060411102747-neeoigoizk3gubgq
Tags: 0.88.1-1ubuntu1
* Synchronize to Debian to get new upstream microrelease (UVF exception
  approved by Daniel Holbach). This fixes the following vulnerabilities:
  - CVE-2006-1614: integer overflow in the PE header parser
  - CVE-2006-1615: format string vulnerabilities in logging code
  - CVE-2006-1630: DoS due to invalid memory access in cli_bitset_set()
* debian/clamav-base.init-stub: Protect 'x && y' with '|| true' to not break
  init script if it's run under set -e.

Show diffs side-by-side

added added

removed removed

Lines of Context:
208
208
                /* memset(zfp, 0, sizeof *fp); cleared in zzip_file_close() */
209
209
            }else
210
210
            {
211
 
                if (! (fp = (ZZIP_FILE *)calloc(1, sizeof(*fp))))
 
211
                if (! (fp = (ZZIP_FILE *)cli_calloc(1, sizeof(*fp))))
212
212
                    { err =  ZZIP_OUTOFMEM; goto error; }
213
213
            }
214
214
 
220
220
              { fp->buf32k = dir->cache.buf32k; dir->cache.buf32k = NULL; }
221
221
            else
222
222
            {
223
 
                if (! (fp->buf32k = (char *)malloc(ZZIP_32K)))
 
223
                if (! (fp->buf32k = (char *)cli_malloc(ZZIP_32K)))
224
224
                    { err = ZZIP_OUTOFMEM; goto error; }
225
225
            }
226
226
 
710
710
        int fd = os->open(filename, o_flags); /* io->open */
711
711
        if (fd != -1)
712
712
        {
713
 
            ZZIP_FILE* fp = calloc (1, sizeof(ZZIP_FILE));
 
713
            ZZIP_FILE* fp = cli_calloc (1, sizeof(ZZIP_FILE));
714
714
            if (!fp) { os->close(fd); return 0; } /* io->close */
715
715
 
716
716
            fp->fd = fd; 
973
973
    { /* method == 8, inflate */
974
974
        char *buf;
975
975
        /*FIXME: use a static buffer! */
976
 
        buf = (char *)malloc(ZZIP_32K);
 
976
        buf = (char *)cli_malloc(ZZIP_32K);
977
977
        if (! buf) return -1;
978
978
        
979
979
        while (read_size > 0)