Commit 9b7cd5a4 authored by David Woodhouse's avatar David Woodhouse Committed by Jim Nelson

Don't re-open stdout in thumbnailer: Closes #7580

Causes an SELinux policy violation.
parent 298165e8
......@@ -73,6 +73,7 @@ Timo Westkämper <timo.westkamper@gmail.com>
Alexander Wilms <alexander.wilms@zoho.com>
Timo Witte <timo.witte@googlemail.com>
Gert Wollny <gw.fossdev@gmail.com>
David Woodhouse <dwmw2@infradead.org>
Shan Xiong <shan.xiong@gmail.com>
Translations courtesy of:
......
......@@ -80,6 +80,7 @@ class ShotwellThumbnailer {
Gst.Caps caps;
unowned Gst.Structure s;
Gst.MapInfo mapinfo;
uint8[]? pngdata;
// Get the snapshot buffer format now. We set the caps on the appsink so
// that it can only be an rgb buffer. The only thing we have not specified
......@@ -110,7 +111,8 @@ class ShotwellThumbnailer {
width, height, (((width * 3)+3)&~3), null);
// Save the pixbuf.
pixbuf.save("/dev/stdout", "png");
pixbuf.save_to_buffer(out pngdata, "png");
stdout.write(pngdata);
buffer.unmap(mapinfo);
} else {
stderr.printf("Could not make snapshot\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment