Nigel Horne wrote:
Brian Bebeau wrote:
Could someone please explain how the messageDedup() routine
in libclamav/message.c is supposed to work? It doesn't seem
to actually be de-allocating anything.
It's spinning in the second for() loop. Since t2 is
defined as t1->t_next, how will the strcmp() of d1 and d2
ever be 0?
If the two lines' contents are the same thus:
hello
world
world
Oh, OK, gotcha. So it only deallocates duplicate lines?
So in practice it probably won't free up much space. Is
there any way to turn this off so large files don't take
so long? If not, I guess the only other way would be to
keep track of the number of lines in a message myself,
and not run it through ClamAV if it's past a certain
limit. Not optimal, but doable. Thanks for the
clarification.
_______________________________________________
http://lurker.clamav.net/list/clamav-devel.html