Check-in [1566da3fee]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a crash in the code for handling malformed html tables. (CVS 1265)
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:1566da3fee49c03143efbf45affeed0a2466d086
User & Date: danielk1977 2008-02-14 08:39:14
Context
2008-02-14
08:43
Do not draw to unmapped windows. (CVS 1266) check-in: 356765ca5b user: danielk1977 tags: trunk
08:39
Fix a crash in the code for handling malformed html tables. (CVS 1265) check-in: 1566da3fee user: danielk1977 tags: trunk
2008-02-10
07:50
Fix a bug where fts3 was not being used. (CVS 1264) check-in: e07a8747a8 user: danielk1977 tags: trunk
Changes

Changes to src/htmltree.c.

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
..
68
69
70
71
72
73
74


75
76
77
78
79
80
81
...
498
499
500
501
502
503
504




505
506
507
508
509
510
511
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

static const char rcsid[] = "$Id: htmltree.c,v 1.160 2007/12/08 15:36:01 danielk1977 Exp $";

#include "html.h"
#include "swproc.h"
#include <assert.h>
#include <string.h>


................................................................................
    (eTag==Html_TBODY) ? 3 :       \
    (eTag==Html_THEAD) ? 3 :       \
    (eTag==Html_TFOOT) ? 3 :       \
    (eTag==Html_TR)    ? 2 :       \
    (eTag==Html_TD)    ? 1 :       \
    (eTag==Html_TH)    ? 1 : 0     \
)



/*
 *---------------------------------------------------------------------------
 *
 * explicitCloseCount --
 *
 *
................................................................................
           HtmlNodeTagType(HtmlNodeParent(pNode)) == Html_TR
       )
    );
    
    if (!HtmlNodeIsText(pNode)) {
        /* HtmlElementNormalize(HtmlNodeAsElement(pNode)); */
    }





    /* Execute the node-handler script for node pNode, if one exists. */
    pEntry = Tcl_FindHashEntry(&pTree->aNodeHandler, (char *)((size_t) eTag));
    if (pEntry) {
        Tcl_Obj *pEval;
        Tcl_Obj *pScript;
        Tcl_Obj *pNodeCmd;







|







 







>
>







 







>
>
>
>







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
..
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
...
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

static const char rcsid[] = "$Id: htmltree.c,v 1.161 2008/02/14 08:39:14 danielk1977 Exp $";

#include "html.h"
#include "swproc.h"
#include <assert.h>
#include <string.h>


................................................................................
    (eTag==Html_TBODY) ? 3 :       \
    (eTag==Html_THEAD) ? 3 :       \
    (eTag==Html_TFOOT) ? 3 :       \
    (eTag==Html_TR)    ? 2 :       \
    (eTag==Html_TD)    ? 1 :       \
    (eTag==Html_TH)    ? 1 : 0     \
)

static void treeCloseFosterTree(HtmlTree *);

/*
 *---------------------------------------------------------------------------
 *
 * explicitCloseCount --
 *
 *
................................................................................
           HtmlNodeTagType(HtmlNodeParent(pNode)) == Html_TR
       )
    );
    
    if (!HtmlNodeIsText(pNode)) {
        /* HtmlElementNormalize(HtmlNodeAsElement(pNode)); */
    }

    if (!isFragment && TAG_TO_TABLELEVEL(eTag) > 0) {
        treeCloseFosterTree(pTree);
    }

    /* Execute the node-handler script for node pNode, if one exists. */
    pEntry = Tcl_FindHashEntry(&pTree->aNodeHandler, (char *)((size_t) eTag));
    if (pEntry) {
        Tcl_Obj *pEval;
        Tcl_Obj *pScript;
        Tcl_Obj *pNodeCmd;