gumd-dbus-server-p2p.c: fix bug - compare operation was incorrect.
gumd-dbus-server-msg-bus.c: Add null check logic.
gum-crypt.c: Add initialize code.
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Change-Id: I5aec55c14b9312c42451f94ed996435af5bedc52
const gchar *encryp_algo)
{
ssize_t bytes_read = 0;
- gchar salt[SALT_ARRAY_LEN];
+ gchar salt[SALT_ARRAY_LEN] = {0,};
int fd = 0;
gint id_len = METHODID_LEN, i = 0;
connection = g_bus_get_sync (GUM_BUS_TYPE, NULL, &error);
if (!connection) {
- WARN ("Failed to open connection to msg bus: %s", error->message);
- g_error_free (error);
+ if (error) {
+ WARN ("Failed to open connection to msg bus: %s", error->message);
+ g_error_free (error);
+ }
return remote_pid;
}
g_object_unref (connection);
if (!response) {
- WARN ("Request for msg-bus peer pid failed: %s", error->message);
- g_error_free (error);
+ if (error) {
+ WARN ("Request for msg-bus peer pid failed: %s", error->message);
+ g_error_free (error);
+ }
return remote_pid;
}
gumd_dbus_server_p2p_get_address (
GumdDbusServerP2P *server)
{
- g_return_val_if_fail (server || GUMD_IS_DBUS_SERVER_P2P (server), NULL);
+ g_return_val_if_fail (server && GUMD_IS_DBUS_SERVER_P2P (server), NULL);
return g_dbus_server_get_client_address (server->priv->bus_server);
}