W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 1999

tidy memory bugs

From: Jeffrey Wang <jwang@morecom.com>
Date: Fri, 14 May 1999 15:19:38 -0400
Message-ID: <816DF8662E3BD11193DF0060082E9FF512D35D@MORECOMSERVER>
To: "'html-tidy@w3.org'" <html-tidy@w3.org>
I downloaded TIDY release 15th April 1999 and found the following bugs:

(1)
inside void FreeEntities(void) in entities.c

should call
	MemFree(next->name)
before calling
	MemFree(next)
otherwise there is memory leak

(2)
inside void FreeTags(void) in tags.c

should call
	MemFree(next->name)
before calling
	MemFree(next)
otherwise there is memory leak

(3)
inside ClearMemory(void *mem, uint size) in tidy.c

should replace
	memset(mem, size, 0);
with
	memset(mem, 0, size);
otherwise incorrect argument order.

This function is not used in tidy so there is no harm done.

(4)
inside pprint.c

memory leak caused by buffer allocated for linebuf.

You mentioned that you are working on a thread-safe version of pprint. I
believe the bug will be fixed there. Any idea when the new release is
available? I have to use pprint in a multi-threaded environment. If I modify
the pprint myself, I might be out of sync with your future release. So I
hope I can get it from you soon.

Jeffrey
Received on Friday, 14 May 1999 15:19:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:42 GMT