eet eet_connection.c: Added missing NULL check. Patch by Zbigniew Kosinski <z.kosinsk...
authorseoz <seoz>
Thu, 4 Oct 2012 23:40:13 +0000 (23:40 +0000)
committerseoz <seoz@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 4 Oct 2012 23:40:13 +0000 (23:40 +0000)
On Thu, Oct 4, 2012 at 9:12 PM, Zbigniew Kosinski <z.kosinski@samsung.com> wrote:
> Hello,
>
> Please consider to add another NULL checks in eet lib:
>
> 1.      eet_data_descriptor_element_add - NULL check for data descriptor
> handle parameter.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eet@77494 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/eet_connection.c

index c044e3d..a192d4e 100644 (file)
@@ -185,6 +185,8 @@ eet_connection_send(Eet_Connection      *conn,
    int data_size;
    Eina_Bool ret = EINA_FALSE;
 
+   EINA_SAFETY_ON_NULL_RETURN_VAL(conn, EINA_FALSE);
+
    flat_data = eet_data_descriptor_encode_cipher(edd,
                                                  data_in,
                                                  cipher_key,
@@ -204,6 +206,8 @@ eet_connection_node_send(Eet_Connection *conn,
    int data_size;
    Eina_Bool ret = EINA_FALSE;
 
+   EINA_SAFETY_ON_NULL_RETURN_VAL(conn, EINA_FALSE);
+
    data = eet_data_node_encode_cipher(node, cipher_key, &data_size);
    if (!data) return EINA_FALSE;
    if (_eet_connection_raw_send(conn, data, data_size))