|
|
03cf34 |
diff --git a/libsoup/soup-auth-basic.c b/libsoup/soup-auth-basic.c
|
|
|
03cf34 |
index 5f1e718..d8b3226 100644
|
|
|
03cf34 |
--- a/libsoup/soup-auth-basic.c
|
|
|
03cf34 |
+++ b/libsoup/soup-auth-basic.c
|
|
|
03cf34 |
@@ -74,7 +74,7 @@ soup_auth_basic_get_protection_space (SoupAuth *auth, SoupURI *source_uri)
|
|
|
03cf34 |
|
|
|
03cf34 |
/* Strip filename component */
|
|
|
03cf34 |
p = strrchr (space, '/');
|
|
|
03cf34 |
- if (p == space && p[1])
|
|
|
03cf34 |
+ if (p && p == space && p[1])
|
|
|
03cf34 |
p[1] = '\0';
|
|
|
03cf34 |
else if (p && p[1])
|
|
|
03cf34 |
*p = '\0';
|
|
|
03cf34 |
diff --git a/libsoup/soup-auth-negotiate.c b/libsoup/soup-auth-negotiate.c
|
|
|
03cf34 |
index 94863d6..f94760c 100644
|
|
|
03cf34 |
--- a/libsoup/soup-auth-negotiate.c
|
|
|
03cf34 |
+++ b/libsoup/soup-auth-negotiate.c
|
|
|
03cf34 |
@@ -268,7 +268,7 @@ soup_auth_negotiate_update_connection (SoupConnectionAuth *auth, SoupMessage *ms
|
|
|
03cf34 |
} else {
|
|
|
03cf34 |
/* FIXME: report further upward via
|
|
|
03cf34 |
* soup_message_get_error_message */
|
|
|
03cf34 |
- g_warning ("gssapi step failed: %s", err->message);
|
|
|
03cf34 |
+ g_warning ("gssapi step failed: %s", err ? err->message : "Unknown error");
|
|
|
03cf34 |
success = FALSE;
|
|
|
03cf34 |
}
|
|
|
03cf34 |
} else if (!strncmp (header, "Negotiate ", 10)) {
|
|
|
03cf34 |
diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c
|
|
|
03cf34 |
index a180c6e..abef34c 100644
|
|
|
03cf34 |
--- a/libsoup/soup-message-headers.c
|
|
|
03cf34 |
+++ b/libsoup/soup-message-headers.c
|
|
|
03cf34 |
@@ -1324,7 +1324,7 @@ content_type_setter (SoupMessageHeaders *hdrs, const char *value)
|
|
|
03cf34 |
{
|
|
|
03cf34 |
g_free (hdrs->content_type);
|
|
|
03cf34 |
if (value) {
|
|
|
03cf34 |
- char *content_type, *p;
|
|
|
03cf34 |
+ char *content_type = NULL, *p;
|
|
|
03cf34 |
|
|
|
03cf34 |
parse_content_foo (hdrs, "Content-Type", &content_type, NULL);
|
|
|
03cf34 |
p = strpbrk (content_type, " /");
|
|
|
03cf34 |
diff --git a/libsoup/soup-xmlrpc.c b/libsoup/soup-xmlrpc.c
|
|
|
03cf34 |
index 42dcda9..2da6344 100644
|
|
|
03cf34 |
--- a/libsoup/soup-xmlrpc.c
|
|
|
03cf34 |
+++ b/libsoup/soup-xmlrpc.c
|
|
|
03cf34 |
@@ -588,7 +588,7 @@ signature_get_next_complete_type (const char **signature)
|
|
|
03cf34 |
|
|
|
03cf34 |
(*signature)++;
|
|
|
03cf34 |
|
|
|
03cf34 |
- if ( (*signature)[0] == stack[stack_len - 1])
|
|
|
03cf34 |
+ if ( stack_len > 0 && (*signature)[0] == stack[stack_len - 1])
|
|
|
03cf34 |
stack_len--;
|
|
|
03cf34 |
} while (stack_len > 0);
|
|
|
03cf34 |
|
|
|
03cf34 |
diff --git a/tests/test-utils.c b/tests/test-utils.c
|
|
|
03cf34 |
index 9c74206..fc58362 100644
|
|
|
03cf34 |
--- a/tests/test-utils.c
|
|
|
03cf34 |
+++ b/tests/test-utils.c
|
|
|
03cf34 |
@@ -676,6 +678,8 @@ soup_test_request_read_all (SoupRequest *req,
|
|
|
03cf34 |
|
|
|
03cf34 |
if (!SOUP_IS_SESSION_SYNC (soup_request_get_session (req)))
|
|
|
03cf34 |
data.loop = g_main_loop_new (g_main_context_get_thread_default (), FALSE);
|
|
|
03cf34 |
+ else
|
|
|
03cf34 |
+ data.loop = NULL;
|
|
|
03cf34 |
|
|
|
03cf34 |
do {
|
|
|
03cf34 |
if (SOUP_IS_SESSION_SYNC (soup_request_get_session (req))) {
|
|
|
03cf34 |
@@ -691,7 +695,7 @@ soup_test_request_read_all (SoupRequest *req,
|
|
|
03cf34 |
}
|
|
|
03cf34 |
} while (nread > 0);
|
|
|
03cf34 |
|
|
|
03cf34 |
- if (!SOUP_IS_SESSION_SYNC (soup_request_get_session (req)))
|
|
|
03cf34 |
+ if (data.loop)
|
|
|
03cf34 |
g_main_loop_unref (data.loop);
|
|
|
03cf34 |
|
|
|
03cf34 |
return nread == 0;
|