crashtesting ooo84576-1.odt
commitda798460e370a97597ecc9a06634f400c4b2e0cc
authorNoel Grandin <noel.grandin@collabora.co.uk>
Thu, 8 Dec 2022 12:50:54 +0000 (8 14:50 +0200)
committerNoel Grandin <noel.grandin@collabora.co.uk>
Thu, 8 Dec 2022 18:24:22 +0000 (8 18:24 +0000)
treecfdb9ae3b4a1ded1b9c7d67cc96c13c03259d4ae
parent243131397a5b626c2d8442dc716193e27b13ef9f
crashtesting ooo84576-1.odt

prevent the OOM by detecting cycles in SwList::SwList and throwing an
exception.

(1) However, that means we need to catch the exception in
    XMLTextListBlockContext::XMLTextListBlockContext
and undo some registration, otherwise we will get a use-after-free.

The need to catch it is why I'm using an UNO exception here,
it seemed like a bad idea to throw and then catch and std::foo
exception.

(2) this is still not the end of the story, a further exception
is thrown during SwDoc destruction, for which I don't have a
solution.

Change-Id: I48be3d8acbdc0f9ca948a958f1124b158ba77ac0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143820
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
sw/source/core/doc/list.cxx
xmloff/source/text/XMLTextListBlockContext.cxx