summaryrefslogtreecommitdiff
path: root/test/meson.build
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2022-03-02 16:13:28 +0100
committerUli Schlachter <psychon@znc.in>2022-03-08 18:11:23 +0100
commit6a81bf8201ddeb8ff9b2174facc35e4076f08dd8 (patch)
treea0c6d4a8f53ace6e10241ed8718d798e2048a953 /test/meson.build
parent1fee5ac98590c9121890e44960a65928293ecaaf (diff)
downloadcairo-6a81bf8201ddeb8ff9b2174facc35e4076f08dd8.tar.gz
script: Implement device finish
Before this commit, calling cairo_device_finish() on a cairo-script context did not actually do anything in the backend. Thus, it was possible to continue emitting output on the script context even after it was finished, which means that API user had no way of preventing use-after-free bugs in their write callback. Bug 277 triggers this via detaching a snapshot, but I guess one could also simply continue drawing to a script surface. This commit implements the finish function by closing the underlying stream. However, that was not enough to fix things. This commit also turns writing into a stream into a no-op after the stream was closed. I checked that the new test case actually fails before this commit and is indeed fixed by it. Fixes: https://gitlab.freedesktop.org/cairo/cairo/-/issues/277 Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'test/meson.build')
-rw-r--r--test/meson.build3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/meson.build b/test/meson.build
index c0be0e086..d23961693 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -24,8 +24,9 @@ test_sources = [
'bug-spline.c',
'big-trap.c',
'bilevel-image.c',
- 'bug-40410.c',
+ 'bug-277.c',
'bug-361.c',
+ 'bug-40410.c',
'bug-431.c',
'bug-448.c',
'bug-51910.c',