]> git.lyx.org Git - features.git/commit
Avoid memory reuse problems with inset-dissolve
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 15 Jun 2017 09:37:40 +0000 (11:37 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 15 Jun 2017 09:53:33 +0000 (11:53 +0200)
commit9c92494e1a486435984130fc4c8274d26682ad37
treedbaa7fe4f2031291c5c87d53ca87305c028ac2ec
parent939962869b4670ac5214152204d5814ebcd00fc8
Avoid memory reuse problems with inset-dissolve

If
 1. the inset is deleted before pasting its contents in the outer text, and
 2. the inset contents begins with an inset, and
 3. the clone of this inner inset is allocated at the memory location just
    made free,
then bad things can happen.

To avoid this, we delete the inset only after its contents has been pasted.

Fixes bug #10667.
src/Text.cpp