]> git.lizzy.rs Git - plan9front.git/commit
libhtml: fix potential linked list corruption
authorcinap_lenrek <cinap_lenrek@gmx.de>
Wed, 4 Sep 2013 22:55:58 +0000 (00:55 +0200)
committercinap_lenrek <cinap_lenrek@gmx.de>
Wed, 4 Sep 2013 22:55:58 +0000 (00:55 +0200)
commit95fac5e87304a50f7e93de94f0f682ec06565006
tree9ee3d2f9a7d9c58f08def76087e91bf6ac47fe0f
parentcca9a1b52381fe2c839350226eceeb1cc987c27f
libhtml: fix potential linked list corruption

the difficulty is freeing items while parsing because items might already
be linked into various linked lists like in docinfo.images or form.fiels.
so we link images, tables and formfields to the docinfo as the final step
of getitems() pass using the new recursive function linkitems(). as only
reachable items get linked theres no danger of dangeling pointers.
sys/include/html.h
sys/src/libhtml/build.c