[Pkg-clamav-devel] Bug#774686: ClamAV: Can't create new file
Sebastian Andrzej Siewior
sebastian at breakpoint.cc
Sun Jan 11 20:37:40 UTC 2015
On 2015-01-10 15:51:19 [+0100], Andreas Cadhalpun wrote:
> Hi Sebastian,
Hi Andreas,
> If I understand correctly, this problem only affects scanning (partially)
> broken archives and thus shouldn't have a major impact.
> In particular the provided sample seems to be broken completely, because
> cabextract only extracts empty files.
I think that this is a shortcomming of the libmspack library. 7z of
p7zip-full is able to extract those files. So it is not broken, it may
use something that not implemented as expected.
> In light of this I'd say the fix can wait until the next release.
>
> >diff --git a/libclamav/libmspack.c b/libclamav/libmspack.c
> >index e94312e..92338d5 100644
> >--- a/libclamav/libmspack.c
> >+++ b/libclamav/libmspack.c
> >@@ -399,8 +397,12 @@ int cli_scanmscab(cli_ctx *ctx, off_t sfx_offset)
> > }
> > free(tmp_fname);
> > files++;
> >- if (ret == CL_VIRUS && SCAN_ALL)
> >- continue;
> >+ if (ret == CL_VIRUS) {
> >+ if (SCAN_ALL)
> >+ continue;
> >+ else
> >+ break;
> >+ }
> > if (ret)
> > break;
> > }
>
> These changes seem to have no effect, or have they?
After looking at this in peace I have to say that this change should
have no effect. I will revert the two changes.
> The rest of the patch looks good.
Thanks for looking.
> Best regards,
> Andreas
Sebastian
More information about the Pkg-clamav-devel
mailing list