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

6b3c76
From 3305aab87c435486dd9f83364c145577cf80e49b Mon Sep 17 00:00:00 2001
a85e8e
From: Robert Marshall <rmarshall@redhat.com>
a85e8e
Date: Mon, 11 Jul 2016 10:59:48 -0400
6b3c76
Subject: [PATCH 205/261] 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
6b3c76
index 537019f2c..146858284 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;
6b3c76
-- 
6b3c76
2.13.5
6b3c76