~ubuntu-branches/ubuntu/hardy/clamav/hardy-backports

« back to all changes in this revision

Viewing changes to libclamav/unzip.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Meskes, Stephen Gran, Michael Meskes, Michael Tautschnig
  • Date: 2008-11-29 12:15:34 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (4.1.3 sid) (0.5.4 karmic)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20081129121534-8sbpoy6kr01ox2eo
[ Stephen Gran ]
* New upstream version

[ Michael Meskes ]
* Removed unused debconf templates and unfuzzied all translations.

[ Michael Tautschnig ]
* Removed --unzip from clampipe script (closes: #506055)
* Moved clamav-milter specific stuff from its specific README.Debian to
  clamav-global one.
* Sync start of clamav-milter with clamav-daemon when clamav-daemon is being
  upgraded (closes: #309067)
* The TemporaryDirectory option has been added long ago, no need for hacks
  via clamav-daemon.default anymore (closes: #253080)

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
        if(cli_writen(of, obuf, sizeof(obuf)-(*avail_out)) != (int)(sizeof(obuf)-(*avail_out))) {
175
175
          cli_warnmsg("cli_unzip: falied to write %lu inflated bytes\n", sizeof(obuf)-(*avail_out));
176
176
          ret = CL_EIO;
177
 
          res=1;
 
177
          res = 100;
 
178
          break;
178
179
        }
179
180
        *next_out = obuf;
180
181
        *avail_out = sizeof(obuf);
217
218
        if(cli_writen(of, obuf, sizeof(obuf)-strm.avail_out) != (int)(sizeof(obuf)-strm.avail_out)) {
218
219
          cli_warnmsg("cli_unzip: falied to write %lu bunzipped bytes\n", sizeof(obuf)-strm.avail_out);
219
220
          ret = CL_EIO;
220
 
          res=1;
 
221
          res = 100;
 
222
          break;
221
223
        }
222
224
        strm.next_out = obuf;
223
225
        strm.avail_out = sizeof(obuf);
224
 
        continue;
 
226
        if (res == BZ_OK) continue; /* after returning BZ_STREAM_END once, decompress returns an error */
225
227
      }
226
228
      break;
227
229
    }
228
230
    BZ2_bzDecompressEnd(&strm);
229
 
    if (res == BZ_STREAM_END) {
230
 
      res=0;
231
 
    }
 
231
    if (res == BZ_STREAM_END) res=0;
232
232
    break;
233
233
  }
234
234
#endif /* HAVE_BZLIB_H */
255
255
        if(cli_writen(of, obuf, sizeof(obuf)-strm.avail_out) != (int)(sizeof(obuf)-strm.avail_out)) {
256
256
          cli_warnmsg("cli_unzip: falied to write %lu exploded bytes\n", sizeof(obuf)-strm.avail_out);
257
257
          ret = CL_EIO;
258
 
          res=1;
 
258
          res = 100;
 
259
          break;
259
260
        }
260
261
        strm.next_out = (uint8_t *)obuf;
261
262
        strm.avail_out = sizeof(obuf);