[composer-autosave] Use-after-free during snapshot save to file ][
commit2179125d8336cfdcaaec994d5aba1aa5e1363137
authorMilan Crha <mcrha@redhat.com>
Tue, 29 May 2018 10:52:54 +0000 (29 12:52 +0200)
committerMilan Crha <mcrha@redhat.com>
Tue, 29 May 2018 10:52:54 +0000 (29 12:52 +0200)
tree6e1a53c5f2c957c26ba30abee2e93f8a2370e00a
parentacf1095e1531c893c054452af15cb337421a3198
[composer-autosave] Use-after-free during snapshot save to file ][

Extend the previous change to not do autosave when the composer is busy,
to avoid calls interleave. When the message is building, the composer
asks the HTML editor for the message content. This is done with a D-Bus
call to the WebKitWebProcess, which cannot block the main loop, because
the WebKit can do its own IPC calls there, thus the GUI would just block
in that case. Having the GUI updated during the wait for the message
content can also mean that the user will send the message in that time,
or the autosave will be triggered, where both can mean a use-after-free
of the variables being involved in the message building.

This had been reported downstream at:
https://bugzilla.redhat.com/show_bug.cgi?id=1538865
src/composer/e-composer-private.c
src/composer/e-composer-private.h
src/composer/e-msg-composer.c
src/composer/e-msg-composer.h
src/modules/composer-autosave/e-composer-autosave.c