[epiphany/mcatanzaro/sync-crash] sync: don't crash when message body is empty
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/sync-crash] sync: don't crash when message body is empty
- Date: Sat, 11 Jan 2020 20:52:12 +0000 (UTC)
commit ef0b4177b57fd6ed8d3b24467fa88703c0a6f279
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Jan 11 14:51:36 2020 -0600
sync: don't crash when message body is empty
I started getting crashes here after I uninstalled glib-networking in my
jhbuild environment.
lib/sync/ephy-sync-service.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/lib/sync/ephy-sync-service.c b/lib/sync/ephy-sync-service.c
index 24f5f433d..35e2ccc87 100644
--- a/lib/sync/ephy-sync-service.c
+++ b/lib/sync/ephy-sync-service.c
@@ -919,6 +919,11 @@ get_signed_certificate_cb (SoupSession *session,
const char *message = NULL;
const char *certificate = NULL;
+ if (!msg->response_body || !msg->response_body->data) {
+ g_warning ("No response body");
+ goto out_error;
+ }
+
node = json_from_string (msg->response_body->data, &error);
if (error) {
g_warning ("Response is not a valid JSON: %s", error->message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]