~ubuntu-branches/ubuntu/raring/clamav/raring

« back to all changes in this revision

Viewing changes to libclamav/chmunpack.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Gran
  • Date: 2008-09-05 17:25:34 UTC
  • mfrom: (0.35.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080905172534-yi3f8fkye1o7u1r3
* New upstream version (closes: #497662, #497773)
  - lots of new options for clamd.conf
  - fixes CVEs CVE-2008-3912, CVE-2008-3913, CVE-2008-3914, and
    CVE-2008-1389
* No longer supports --unzip option, so typo is gone (closes: #496276)
* Translations:
  - sv (thanks Martin Bagge <brother@bsnet.se>) (closes: #491760)

Show diffs side-by-side

added added

removed removed

Lines of Context:
449
449
        cli_dbgmsg("in read_chunk\n");
450
450
 
451
451
        if (metadata->itsp_hdr.block_len < 8 || metadata->itsp_hdr.block_len > 33554432) {
452
 
                return FALSE;
 
452
                return CL_EFORMAT;
453
453
        }
454
454
 
455
455
        if (metadata->m_area != NULL) {
765
765
        lzx_decompress(stream, length);
766
766
        lzx_free(stream);
767
767
        
 
768
#ifndef C_WINDOWS
768
769
        /* Delete the file */
769
 
        unlink(filename);
770
 
        retval = tmpfd;
 
770
        if(cli_unlink(filename))
 
771
                retval = -1;
 
772
        else
 
773
#endif
 
774
                retval = tmpfd;
771
775
        
772
776
abort:
773
777
        if ((retval == -1) && (tmpfd >= 0)) {
911
915
                        cli_dbgmsg("read_chunk failed");
912
916
                        goto abort;
913
917
                }
914
 
                read_control_entries(metadata);
 
918
                if (read_control_entries(metadata) == FALSE) {
 
919
                        goto abort;
 
920
                }
915
921
                metadata->num_chunks--;
916
922
                metadata->chunk_offset += metadata->itsp_hdr.block_len;
917
923
        }