[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. 99ae9353f6834da0cb73f59f4b32d1f0ae1263fa
Stephen Gran
steve at lobefin.net
Thu Sep 4 12:37:03 UTC 2008
The following commit has been merged in the debian/unstable branch:
commit b5b68914a187d7ceb0fa9afa6732d661483f6a88
Author: Stephen Gran <steve at lobefin.net>
Date: Thu Sep 4 13:25:47 2008 +0100
Revert "merge SVN r3775:3777 from trunk. Fix for bb #921. "
This reverts commit aaa165298faf6396098866ae3f9c26188dadbde4.
diff --git a/ChangeLog b/ChangeLog
index f51d844..fab5956 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,3 @@
-Tue Apr 8 22:27:11 EEST 2008 (edwin)
--------------------------------------
- * libclamav/mspack.[ch]: fix build on NetBSD 4.0 (bb #921)
-
Mon Apr 7 22:38:27 CEST 2008 (tk)
----------------------------------
* libclamav/msexpand.c: fix big-endian support
diff --git a/libclamav/mspack.c b/libclamav/mspack.c
index 6710e5e..22dbc0d 100644
--- a/libclamav/mspack.c
+++ b/libclamav/mspack.c
@@ -124,11 +124,11 @@ static const unsigned short mszip_bit_mask_tab[17] = {
} while (0)
static int mszip_read_input(struct mszip_stream *zip) {
- 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);
- if (nread < 0) return zip->error = CL_EIO;
+ int read = zip->read ? zip->read(zip->file, zip->inbuf, (int)zip->inbuf_size) : cli_readn(zip->fd, zip->inbuf, (int)zip->inbuf_size);
+ if (read < 0) return zip->error = CL_EIO;
zip->i_ptr = &zip->inbuf[0];
- zip->i_end = &zip->inbuf[nread];
+ zip->i_end = &zip->inbuf[read];
return CL_SUCCESS;
}
@@ -563,7 +563,7 @@ struct mszip_stream *mszip_init(int fd,
int input_buffer_size,
int repair_mode,
struct cab_file *file,
- int (*read_cb)(struct cab_file *, unsigned char *, int))
+ int (*read)(struct cab_file *, unsigned char *, int))
{
struct mszip_stream *zip;
@@ -597,7 +597,7 @@ struct mszip_stream *mszip_init(int fd,
zip->bit_buffer = 0; zip->bits_left = 0;
zip->file = file;
- zip->read_cb = read_cb;
+ zip->read = read;
return zip;
}
@@ -748,7 +748,7 @@ void mszip_free(struct mszip_stream *zip) {
} while (0)
static int lzx_read_input(struct lzx_stream *lzx) {
- 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);
+ int bread = lzx->read ? lzx->read(lzx->file, &lzx->inbuf[0], (int)lzx->inbuf_size) : cli_readn(lzx->fd, &lzx->inbuf[0], (int)lzx->inbuf_size);
if (bread < 0) return lzx->error = CL_EIO;
/* huff decode's ENSURE_BYTES(16) might overrun the input stream, even
@@ -985,7 +985,7 @@ struct lzx_stream *lzx_init(int fd,
int input_buffer_size,
off_t output_length,
struct cab_file *file,
- int (*read_cb)(struct cab_file *, unsigned char *, int))
+ int (*read)(struct cab_file *, unsigned char *, int))
{
unsigned int window_size = 1 << window_bits;
struct lzx_stream *lzx;
@@ -1035,7 +1035,7 @@ struct lzx_stream *lzx_init(int fd,
lzx->offset = 0;
lzx->length = output_length;
lzx->file = file;
- lzx->read_cb = read_cb;
+ lzx->read = read;
lzx->inbuf_size = input_buffer_size;
lzx->window_size = 1 << window_bits;
@@ -1576,11 +1576,11 @@ void lzx_free(struct lzx_stream *lzx) {
} while (0)
static int qtm_read_input(struct qtm_stream *qtm) {
- 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);
- if (nread < 0) return qtm->error = CL_EIO;
+ int read = qtm->read ? qtm->read(qtm->file, &qtm->inbuf[0], (int)qtm->inbuf_size) : cli_readn(qtm->fd, &qtm->inbuf[0], (int)qtm->inbuf_size);
+ if (read < 0) return qtm->error = CL_EIO;
qtm->i_ptr = &qtm->inbuf[0];
- qtm->i_end = &qtm->inbuf[nread];
+ qtm->i_end = &qtm->inbuf[read];
return CL_SUCCESS;
}
@@ -1688,7 +1688,7 @@ static void qtm_init_model(struct qtm_model *model,
struct qtm_stream *qtm_init(int fd, int ofd,
int window_bits, int input_buffer_size,
struct cab_file *file,
- int (*read_cb)(struct cab_file *, unsigned char *, int))
+ int (*read)(struct cab_file *, unsigned char *, int))
{
unsigned int window_size = 1 << window_bits;
struct qtm_stream *qtm;
@@ -1768,7 +1768,7 @@ struct qtm_stream *qtm_init(int fd, int ofd,
qtm_init_model(&qtm->model7, &qtm->m7sym[0], 0, 7);
qtm->file = file;
- qtm->read_cb = read_cb;
+ qtm->read = read;
/* all ok */
return qtm;
diff --git a/libclamav/mspack.h b/libclamav/mspack.h
index a6788a8..87b18ed 100644
--- a/libclamav/mspack.h
+++ b/libclamav/mspack.h
@@ -82,7 +82,7 @@ struct mszip_stream {
/* cabinet related stuff */
struct cab_file *file;
- int (*read_cb)(struct cab_file *, unsigned char *, int);
+ int (*read)(struct cab_file *, unsigned char *, int);
unsigned char wflag; /* write flag */
@@ -93,7 +93,7 @@ struct mszip_stream *mszip_init(int fd,
int input_buffer_size,
int repair_mode,
struct cab_file *file,
- int (*read_cb)(struct cab_file *, unsigned char *, int));
+ int (*read)(struct cab_file *, unsigned char *, int));
extern int mszip_decompress(struct mszip_stream *zip, off_t out_bytes);
@@ -167,7 +167,7 @@ struct qtm_stream {
/* cabinet related stuff */
struct cab_file *file;
- int (*read_cb)(struct cab_file *, unsigned char *, int);
+ int (*read)(struct cab_file *, unsigned char *, int);
/* I/O buffers - 2*/
unsigned char *inbuf, *i_ptr, *i_end, *o_ptr, *o_end;
@@ -181,7 +181,7 @@ extern struct qtm_stream *qtm_init(int fd,
int window_bits,
int input_buffer_size,
struct cab_file *file,
- int (*read_cb)(struct cab_file *, unsigned char *, int));
+ int (*read)(struct cab_file *, unsigned char *, int));
extern int qtm_decompress(struct qtm_stream *qtm, off_t out_bytes);
@@ -274,7 +274,7 @@ struct lzx_stream {
/* cabinet related stuff */
struct cab_file *file;
- int (*read_cb)(struct cab_file *, unsigned char *, int);
+ int (*read)(struct cab_file *, unsigned char *, int);
unsigned char extra_bits[51];
@@ -287,7 +287,7 @@ struct lzx_stream *lzx_init(int fd,
int input_buffer_size,
off_t output_length,
struct cab_file *file,
- int (*read_cb)(struct cab_file *, unsigned char *, int));
+ int (*read)(struct cab_file *, unsigned char *, int));
extern void lzx_set_output_length(struct lzx_stream *lzx,
off_t output_length);
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list