W3C home > Mailing lists > Public > html-tidy@w3.org > January to March 2003

Crash in TidyLib and Memory Leaks

From: Dan Petitt <danp@coderanger.com>
Date: Sat, 15 Mar 2003 14:26:01 -0000
To: <html-tidy@w3.org>
Message-ID: <000301c2eafe$ce8aa260$c90aa8c0@MYVAIO>

Hi all

Took quite a while to narrow this down the following example:

Using the example test app, set the following options as below...
  ok = tidyOptSetBool( tdoc, TidyHtmlOut, yes );
  ok = tidyOptSetBool( tdoc, TidyEncloseBlockText, yes );

Then, try and validate/clean the following HTML...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Test</title>
</head>

<body>

<table><tbody>
<tr>
<td><br></td>
</tr>
</tbody></table>

</body>
</html>

You will get an exception in FixBrakes...
    /*  First, check the status of All My Children  */
    for ( pNode = pParent->content; NULL != pNode; pNode = pNode->next )

I am also getting a couple of memory leaks somewhere, not related to the
above problem.

Hope this helps someone to fix it.
Dan Petitt
Received on Saturday, 15 March 2003 09:31:49 GMT

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