GNOME Bugzilla – Bug 685419
gtkprintbackendfile: Infinite loop in _cairo_write()
Last modified: 2013-04-14 10:22:00 UTC
Created attachment 225698 [details] [review] Patch It can happen if the io channel has been closed. In that case g_io_channel_write_chars() returns early because of a g_return macro that checks if the io channel is writable. When returning from g_return macros, the bytes written output parameter is not updated and the error is not filled, so the error is not detected and the written variable is used uninitialized. We should check the return value of g_io_channel_write_chars() to break the loop.
Review of attachment 225698 [details] [review]: Hi, thank you for the report and the patch. The patch looks good. I have just 2 comments. Could you insert one blank line above the "return CAIRO_STATUS_WRITE_ERROR;" and place the link to this bug to the message? After that, commit it to gtk-3-8 and master please. Marek
Comment on attachment 225698 [details] [review] Patch Pushed to both branches.