more autoit fixes

git-svn: trunk@3346
remotes/push_mirror/metadata
aCaB 18 years ago
parent 051910c969
commit 3c0912c80c
  1. 4
      ChangeLog
  2. 10
      libclamav/autoit.c

@ -1,3 +1,7 @@
Tue Oct 30 22:35:47 CET 2007 (acab)
-----------------------------------
* libclamav/autoit: misc fixes - big thanks to Edwin
Tue Oct 30 19:30:54 CET 2007 (tk)
---------------------------------
* libclamav: add dconf support for autoit

@ -224,6 +224,10 @@ static int ea05(int desc, cli_ctx *ctx, char *tmpd) {
return CL_CLEAN;
comp = *buf;
UNP.csize = cli_readint32((char *)buf+1) ^ 0x45aa;
if ((int32_t)UNP.csize<0) {
cli_dbgmsg("autoit: bad file size - giving up\n");
return CL_CLEAN;
}
cli_dbgmsg("autoit: compressed size: %x\n", UNP.csize);
cli_dbgmsg("autoit: advertised uncompressed size %x\n", cli_readint32((char *)buf+5) ^ 0x45aa);
cli_dbgmsg("autoit: ref chksum: %x\n", cli_readint32((char *)buf+9) ^ 0xc3d2);
@ -272,12 +276,12 @@ static int ea05(int desc, cli_ctx *ctx, char *tmpd) {
UNP.bitmap.full = 0;
UNP.bits_avail = 0;
UNP.error = 0;
while (!UNP.error && UNP.cur_output < UNP.usize) {
if (getbits(&UNP, 1)) {
uint32_t bb, bs, addme=0;
bb = getbits(&UNP, 15);
if ((bs = getbits(&UNP, 2))==3) {
addme = 3;
if((bs = getbits(&UNP, 3))==7) {
@ -326,7 +330,7 @@ static int ea05(int desc, cli_ctx *ctx, char *tmpd) {
/* FIXME: TODO send to text notmalization */
/* FIXME: ad-interim solution. ideally we should only u2a unicode scripts */
/* FIXME: ad-interim solution. ideally we should detect text and turn it to ascii */
UNP.usize = u2a(UNP.outputbuf, UNP.usize);
snprintf(tempfile, 1023, "%s/autoit.%.3u", tmpd, files);

Loading…
Cancel
Save