Browse code

downgrade some error messages (bb#911)

git-svn: trunk@3827

Tomasz Kojm authored on 2008/04/30 22:16:01
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Wed Apr 30 14:15:53 CEST 2008 (tk)
2
+----------------------------------
3
+  * libclamav/mspack.c: downgrade some error messages (bb#911)
4
+
1 5
 Wed Apr 30 12:35:29 CEST 2008 (tk)
2 6
 ----------------------------------
3 7
   * clamav-milter: retrieve db version from daily.cld (bb#942)
... ...
@@ -125,7 +125,7 @@ static const unsigned short mszip_bit_mask_tab[17] = {
125 125
 
126 126
 static int mszip_read_input(struct mszip_stream *zip) {
127 127
   int nread = zip->read_cb ? zip->read_cb(zip->file, zip->inbuf, (int)zip->inbuf_size) : cli_readn(zip->fd, zip->inbuf, (int)zip->inbuf_size);
128
-  if (nread < 0) return zip->error = CL_EIO;
128
+  if (nread < 0) return zip->error = CL_EFORMAT;
129 129
 
130 130
   zip->i_ptr = &zip->inbuf[0];
131 131
   zip->i_end = &zip->inbuf[nread];
... ...
@@ -749,7 +749,7 @@ void mszip_free(struct mszip_stream *zip) {
749 749
 
750 750
 static int lzx_read_input(struct lzx_stream *lzx) {
751 751
   int bread = lzx->read_cb ? lzx->read_cb(lzx->file, &lzx->inbuf[0], (int)lzx->inbuf_size) : cli_readn(lzx->fd, &lzx->inbuf[0], (int)lzx->inbuf_size);
752
-  if (bread < 0) return lzx->error = CL_EIO;
752
+  if (bread < 0) return lzx->error = CL_EFORMAT;
753 753
 
754 754
   /* huff decode's ENSURE_BYTES(16) might overrun the input stream, even
755 755
    * if those bits aren't used, so fake 2 more bytes */
... ...
@@ -1577,7 +1577,7 @@ void lzx_free(struct lzx_stream *lzx) {
1577 1577
 
1578 1578
 static int qtm_read_input(struct qtm_stream *qtm) {
1579 1579
   int nread = qtm->read_cb ? qtm->read_cb(qtm->file, &qtm->inbuf[0], (int)qtm->inbuf_size) : cli_readn(qtm->fd, &qtm->inbuf[0], (int)qtm->inbuf_size);
1580
-  if (nread < 0) return qtm->error = CL_EIO;
1580
+  if (nread < 0) return qtm->error = CL_EFORMAT;
1581 1581
 
1582 1582
   qtm->i_ptr = &qtm->inbuf[0];
1583 1583
   qtm->i_end = &qtm->inbuf[nread];