From 7f5cc2c3c5409a6d5e3acab5d6349ae69fb67922 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 15 May 2014 12:16:00 +0100 Subject: [PATCH] gsocket: Add missing preconditions to g_socket_send_message() https://bugzilla.gnome.org/show_bug.cgi?id=730190 --- gio/gsocket.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gio/gsocket.c b/gio/gsocket.c index 6713d0a05..e59ace816 100644 --- a/gio/gsocket.c +++ b/gio/gsocket.c @@ -3746,6 +3746,11 @@ g_socket_send_message (GSocket *socket, char zero; g_return_val_if_fail (G_IS_SOCKET (socket), -1); + g_return_val_if_fail (address == NULL || G_IS_SOCKET_ADDRESS (address), -1); + g_return_val_if_fail (num_vectors == 0 || vectors != NULL, -1); + g_return_val_if_fail (num_messages == 0 || messages != NULL, -1); + g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), -1); + g_return_val_if_fail (error == NULL || *error == NULL, -1); if (!check_socket (socket, error)) return -1;