Blame SOURCES/evolution-ews-3.12.11-coverity-scan.patch

c25dee
diff -up evolution-ews-3.12.11/src/addressbook/e-book-backend-ews.c.coverity-scan evolution-ews-3.12.11/src/addressbook/e-book-backend-ews.c
c25dee
--- evolution-ews-3.12.11/src/addressbook/e-book-backend-ews.c.coverity-scan	2015-05-21 22:26:36.684877286 +0200
c25dee
+++ evolution-ews-3.12.11/src/addressbook/e-book-backend-ews.c	2015-05-21 22:26:36.686877288 +0200
c25dee
@@ -2720,7 +2720,10 @@ ebews_start_gal_sync (gpointer data)
c25dee
 	if (!ret)
c25dee
 		goto exit;
c25dee
 
c25dee
-	e_book_sqlite_set_key_value (priv->summary, "etag", etag ? etag : "", NULL);
c25dee
+	ret = e_book_sqlite_set_key_value (priv->summary, "etag", etag ? etag : "", NULL);
c25dee
+	if (!ret)
c25dee
+		goto exit;
c25dee
+
c25dee
 	if (e_book_sqlite_set_key_value (priv->summary, "oab-filename",
c25dee
 					 uncompressed_filename, NULL)) {
c25dee
 		/* Don't let it get deleted */
c25dee
diff -up evolution-ews-3.12.11/src/addressbook/ews-oab-decoder.c.coverity-scan evolution-ews-3.12.11/src/addressbook/ews-oab-decoder.c
c25dee
--- evolution-ews-3.12.11/src/addressbook/ews-oab-decoder.c.coverity-scan	2014-09-17 20:19:02.000000000 +0200
c25dee
+++ evolution-ews-3.12.11/src/addressbook/ews-oab-decoder.c	2015-05-21 22:26:36.687877289 +0200
c25dee
@@ -956,7 +956,7 @@ exit:
c25dee
 	if (!contact)
c25dee
 		return ret;
c25dee
 
c25dee
-	if (dset->addr) {
c25dee
+	if (dset && dset->addr) {
c25dee
 		e_contact_set (contact, E_CONTACT_ADDRESS_WORK, dset->addr);
c25dee
 		e_contact_address_free (dset->addr);
c25dee
 	}
c25dee
diff -up evolution-ews-3.12.11/src/server/e-ews-folder.c.coverity-scan evolution-ews-3.12.11/src/server/e-ews-folder.c
c25dee
--- evolution-ews-3.12.11/src/server/e-ews-folder.c.coverity-scan	2014-11-19 19:06:36.000000000 +0100
c25dee
+++ evolution-ews-3.12.11/src/server/e-ews-folder.c	2015-05-21 22:26:36.687877289 +0200
c25dee
@@ -521,7 +521,7 @@ e_ews_folder_utils_escape_name (const gc
c25dee
 	if (!count)
c25dee
 		return g_strdup (folder_name);
c25dee
 
c25dee
-	res = g_malloc0 (sizeof (gchar *) * (1 + ii + (2 * count)));
c25dee
+	res = g_malloc0 (sizeof (gchar) * (1 + ii + (2 * count)));
c25dee
 	for (ii = 0, jj = 0; folder_name[ii]; ii++, jj++) {
c25dee
 		if (folder_name[ii] == '\\') {
c25dee
 			res[jj] = '\\';
c25dee
diff -up evolution-ews-3.12.11/src/server/e-ews-notification.c.coverity-scan evolution-ews-3.12.11/src/server/e-ews-notification.c
c25dee
--- evolution-ews-3.12.11/src/server/e-ews-notification.c.coverity-scan	2014-10-30 19:32:37.000000000 +0100
c25dee
+++ evolution-ews-3.12.11/src/server/e-ews-notification.c	2015-05-21 22:26:36.687877289 +0200
c25dee
@@ -148,7 +148,7 @@ static EEwsConnection *
c25dee
 e_ews_notification_get_connection (const EEwsNotification *notification)
c25dee
 {
c25dee
 	g_return_val_if_fail (E_IS_EWS_NOTIFICATION (notification), NULL);
c25dee
-	g_return_val_if_fail (notification->priv == NULL, NULL);
c25dee
+	g_return_val_if_fail (notification->priv != NULL, NULL);
c25dee
 
c25dee
 	return notification->priv->connection;
c25dee
 }