Commit 39608764 authored by Philip Withnall's avatar Philip Withnall

src: Use format strings when constructing MessageDialogs

Otherwise translations of the messages passed in might contain format
placeholders which would then cause a read from an unexpected bit of the
stack.

This incorporates a patch by Cosimo Cecchi <cosimo@endlessm.com>.
Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
parent 8d5fb9c4
Pipeline #76740 passed with stage
in 28 minutes and 57 seconds
......@@ -322,7 +322,7 @@ public class Contacts.ContactPane : Stack {
DialogFlags.DESTROY_WITH_PARENT | DialogFlags.MODAL,
MessageType.ERROR,
ButtonsType.OK,
message);
"%s", message);
dialog.run ();
dialog.destroy ();
}
......
......@@ -169,7 +169,7 @@ namespace Contacts.Utils {
Gtk.DialogFlags.MODAL,
Gtk.MessageType.ERROR,
Gtk.ButtonsType.OK,
error);
"%s", error);
dialog.run();
dialog.destroy();
}
......
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