~ubuntu-branches/ubuntu/lucid/clamav/lucid-updates

« back to all changes in this revision

Viewing changes to libclamav/unarj.c

  • Committer: Package Import Robot
  • Author(s): Chris, Marc Deslauriers, Chris Pollock
  • Date: 2015-02-08 07:54:07 UTC
  • mfrom: (81.1.10 lucid-security)
  • Revision ID: package-import@ubuntu.com-20150208075407-sjpyx5pb5emtexcl
Tags: 0.98.6+dfsg-0ubuntu0.10.04.1
[ Marc Deslauriers ]
* Updated to 0.98.6 to fix security issues, including CVE-2014-9328.
  (LP: #1420819)
* Removed upstreamed patches:
  - d/p/0002-Add-an-additional-n-after-the-number-in-the-pidfile.patch
  - d/p/0017-Bump-.so-version-number.patch

[ Chris Pollock ]
* Drop dh_autoreconf from build-depends
* Remove use of dh_autoreconf from debian/rules
* Adjust list of no LLVM architectures in debian/rules to include powerpc
  to avoid FTBFS on lucid

Show diffs side-by-side

added added

removed removed

Lines of Context:
273
273
        if (i != (unsigned short) (1 << 16)) {
274
274
                k = 1 << tablebits;
275
275
                while (i != k) {
276
 
                        if (i >= tablesize) {
 
276
                        if (i >= (unsigned int)tablesize) {
277
277
                                cli_dbgmsg("UNARJ: bounds exceeded\n");
278
278
                                decode_data->status = CL_EUNPACK;
279
279
                                return CL_EUNPACK;
588
588
                                cli_dbgmsg("UNARJ: bounds exceeded - probably a corrupted file.\n");
589
589
                                break;
590
590
                        }
591
 
                        if (out_ptr > i && out_ptr < DDICSIZ - MAXMATCH - 1) {
 
591
                        if (out_ptr > (uint32_t)i && out_ptr < DDICSIZ - MAXMATCH - 1) {
592
592
                                while ((--j >= 0) && (i < DDICSIZ) && (out_ptr < DDICSIZ)) {
593
593
                                        decode_data.text[out_ptr++] = decode_data.text[i++];
594
594
                                }
779
779
                        return CL_EFORMAT;
780
780
                }
781
781
                metadata->offset += count;
782
 
                if (cli_writen(ofd, data, count) != count) {
 
782
                if ((size_t)cli_writen(ofd, data, count) != count) {
783
783
                        /* File writing problem */
784
784
                        return CL_EWRITE;
785
785
                }
807
807
static int arj_read_main_header(arj_metadata_t *metadata)
808
808
{
809
809
        uint16_t header_size, count;
810
 
        uint32_t crc;
811
810
        arj_main_hdr_t main_hdr;
812
811
        const char *filename, *comment;
813
812
        off_t header_offset;
984
983
 
985
984
int cli_unarj_open(fmap_t *map, const char *dirname, arj_metadata_t *metadata, size_t off)
986
985
{
 
986
    UNUSEDPARAM(dirname);
987
987
        cli_dbgmsg("in cli_unarj_open\n");
988
988
        metadata->map = map;
989
989
        metadata->offset = off;
1014
1014
 
1015
1015
int cli_unarj_extract_file(const char *dirname, arj_metadata_t *metadata)
1016
1016
{
1017
 
        off_t offset;
1018
1017
        int ret = CL_SUCCESS;
1019
1018
        char filename[1024];
1020
1019