X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gio%2Fgunixfdlist.c;h=5808e40cdf9a1dd9c6530e93481baa0b55556d51;hb=25990eb2b6da94e1d03631eab8a952ef84cb9986;hp=4898202e211e94d9f45f77cc4fdeed7b982e9b29;hpb=54cc43630ddf724722ebdfc1d6906dc1986b773d;p=platform%2Fupstream%2Fglib.git diff --git a/gio/gunixfdlist.c b/gio/gunixfdlist.c index 4898202..5808e40 100644 --- a/gio/gunixfdlist.c +++ b/gio/gunixfdlist.c @@ -26,9 +26,9 @@ * the %G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message() * and received using g_socket_receive_message(). * - * Note that <gio/gunixfdlist.h> belongs to - * the UNIX-specific GIO interfaces, thus you have to use the - * gio-unix-2.0.pc pkg-config file when using it. + * Note that `` belongs to the UNIX-specific GIO + * interfaces, thus you have to use the `gio-unix-2.0.pc` pkg-config + * file when using it. */ #include "config.h" @@ -183,7 +183,8 @@ g_unix_fd_list_new_from_array (const gint *fds, list->priv->fds = g_new (gint, n_fds + 1); list->priv->nfd = n_fds; - memcpy (list->priv->fds, fds, sizeof (gint) * n_fds); + if (n_fds > 0) + memcpy (list->priv->fds, fds, sizeof (gint) * n_fds); list->priv->fds[n_fds] = -1; return list;