Fix crash after a tab was opened during reload.
commite9d4d3aef23b6871d73e880221e0612f07503f62
authorKalle Olavi Niemitalo <kon@iki.fi>
Mon, 14 Jul 2008 21:09:27 +0000 (15 00:09 +0300)
committerKalle Olavi Niemitalo <Kalle@Astalo.kon.iki.fi>
Tue, 15 Jul 2008 08:43:03 +0000 (15 11:43 +0300)
tree5df3f87ddb3ed9bae1126009cd755f7137c89cf6
parent6b05cdb3a0a12e8cf8bae3860b1a59e86d3076a1
Fix crash after a tab was opened during reload.

Commit 0b99fa70ca9d0f976655e61adee1a5eebacc0734 "Bug 620: Reset form
fields to default values on reload" made render_document() decrement
vs->form_info_len to 0 while vs->form_info remained non-NULL.
copy_vs() then copied the whole structure with copy_struct and did not
change form_info because form_info_len was 0.  Both view_state
structures had form_info pointing to the same memory block, causing a
segfault when destroy_vs() tried to free that block a second time.

Reported by أحمد المحمودي.
NEWS
src/viewer/text/vs.c