Fix access to free()d memory in the DOM stack state data
commit208515c82f6f2debeb2dd89ab9d79578e74bf191
authorJonas Fonseca <fonseca@diku.dk>
Mon, 5 Dec 2005 10:11:06 +0000 (5 11:11 +0100)
committerJonas Fonseca <fonseca@antimatter.localdomain>
Mon, 5 Dec 2005 10:11:06 +0000 (5 11:11 +0100)
tree49a60e1ec79e69d1ee3046ca68880f616d2e2e96
parentcc416b22343bdb0c0fcd8cd4e28d49d883196b62
Fix access to free()d memory in the DOM stack state data

There already was one work-around in the code related to clearing of the
state data after popping. Instead of storing a pointer to the state data in
the state we now store the depth of the state (in the stack) and use a
macro to access the state data. The bug occurred when reallocating the
stack state objects and the stack data pointers wasn't updated to point to
the newly allocated data.
src/document/dom/stack.c
src/document/dom/stack.h
src/document/sgml/parser.c