diff -up libsoup-2.62.2/libsoup/soup-auth-basic.c.coverity-scan-issues libsoup-2.62.2/libsoup/soup-auth-basic.c
--- libsoup-2.62.2/libsoup/soup-auth-basic.c.coverity-scan-issues	2018-03-23 14:44:39.000000000 +0100
+++ libsoup-2.62.2/libsoup/soup-auth-basic.c	2018-06-22 11:25:33.383294057 +0200
@@ -74,7 +74,7 @@ soup_auth_basic_get_protection_space (So
 
 	/* Strip filename component */
 	p = strrchr (space, '/');
-	if (p == space && p[1])
+	if (p && p == space && p[1])
 		p[1] = '\0';
 	else if (p && p[1])
 		*p = '\0';
diff -up libsoup-2.62.2/libsoup/soup-cache.c.coverity-scan-issues libsoup-2.62.2/libsoup/soup-cache.c
--- libsoup-2.62.2/libsoup/soup-cache.c.coverity-scan-issues	2018-03-23 14:44:54.000000000 +0100
+++ libsoup-2.62.2/libsoup/soup-cache.c	2018-06-22 11:25:33.384294057 +0200
@@ -822,6 +822,9 @@ soup_cache_content_processor_wrap_input
 	StreamHelper *helper;
 	time_t request_time, response_time;
 
+	g_return_val_if_fail (SOUP_IS_CACHE (cache), NULL);
+	g_return_val_if_fail (SOUP_IS_MESSAGE (msg), NULL);
+
 	/* First of all, check if we should cache the resource. */
 	cacheability = soup_cache_get_cacheability (cache, msg);
 	entry = soup_cache_entry_lookup (cache, msg);
@@ -1075,6 +1078,9 @@ soup_cache_has_response (SoupCache *cach
 	int max_age, max_stale, min_fresh;
 	GList *lru_item, *item;
 
+	g_return_val_if_fail (SOUP_IS_CACHE (cache), SOUP_CACHE_RESPONSE_STALE);
+	g_return_val_if_fail (SOUP_IS_MESSAGE (msg), SOUP_CACHE_RESPONSE_STALE);
+
 	entry = soup_cache_entry_lookup (cache, msg);
 
 	/* 1. The presented Request-URI and that of stored response
@@ -1404,6 +1415,9 @@ soup_cache_cancel_conditional_request (S
 {
 	SoupCacheEntry *entry;
 
+	g_return_if_fail (SOUP_IS_CACHE (cache));
+	g_return_if_fail (SOUP_IS_MESSAGE (msg));
+
 	entry = soup_cache_entry_lookup (cache, msg);
 	if (entry)
 		entry->being_validated = FALSE;
@@ -1415,7 +1429,12 @@ void
 soup_cache_update_from_conditional_request (SoupCache   *cache,
 					    SoupMessage *msg)
 {
-	SoupCacheEntry *entry = soup_cache_entry_lookup (cache, msg);
+	SoupCacheEntry *entry;
+
+	g_return_if_fail (SOUP_IS_CACHE (cache));
+	g_return_if_fail (SOUP_IS_MESSAGE (msg));
+
+	entry = soup_cache_entry_lookup (cache, msg);
 	if (!entry)
 		return;
 
