Blame SOURCES/0205-Fix-CLANG-error-from-Coverity-1154226.patch

d41074
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
a85e8e
From: Robert Marshall <rmarshall@redhat.com>
a85e8e
Date: Mon, 11 Jul 2016 10:59:48 -0400
d41074
Subject: [PATCH] Fix CLANG error from Coverity (#1154226)
a85e8e
a85e8e
Resolved a null pointer deference warning from coverity.
a85e8e
a85e8e
Related: rhbz#1154226
a85e8e
---
a85e8e
 grub-core/net/url.c | 7 ++++++-
a85e8e
 1 file changed, 6 insertions(+), 1 deletion(-)
a85e8e
a85e8e
diff --git a/grub-core/net/url.c b/grub-core/net/url.c
d41074
index 537019f2c78..146858284cd 100644
a85e8e
--- a/grub-core/net/url.c
a85e8e
+++ b/grub-core/net/url.c
a85e8e
@@ -267,7 +267,12 @@ extract_http_url_info (char *url, int ssl,
a85e8e
     }
a85e8e
 
a85e8e
   l = host_end - host_off;
a85e8e
-  c = *host_end;
a85e8e
+
a85e8e
+  if (host_end == NULL)
a85e8e
+    goto fail;
a85e8e
+  else
a85e8e
+    c = *host_end;
a85e8e
+
a85e8e
   *host_end = '\0';
a85e8e
   *host = grub_strndup (host_off, l);
a85e8e
   *host_end = c;