Blame SOURCES/0258-Fix-one-more-coverity-complaint.patch

6b3c76
From 5b6796eb8c43c6d16fcb92cc1c5cb4351c4e7050 Mon Sep 17 00:00:00 2001
a85e8e
From: Peter Jones <pjones@redhat.com>
a85e8e
Date: Thu, 25 May 2017 11:27:40 -0400
6b3c76
Subject: [PATCH 258/261] Fix one more coverity complaint
a85e8e
a85e8e
No idea why covscan thinks this is an "added" bug, since the file hasn't
a85e8e
changed in 3 years, but... yeah.
a85e8e
a85e8e
Signed-off-by: Peter Jones <pjones@redhat.com>
a85e8e
---
a85e8e
 grub-core/normal/completion.c | 3 ++-
a85e8e
 1 file changed, 2 insertions(+), 1 deletion(-)
a85e8e
a85e8e
diff --git a/grub-core/normal/completion.c b/grub-core/normal/completion.c
6b3c76
index 2c9b9e931..93aa0d8ed 100644
a85e8e
--- a/grub-core/normal/completion.c
a85e8e
+++ b/grub-core/normal/completion.c
a85e8e
@@ -284,7 +284,8 @@ complete_file (void)
a85e8e
 
a85e8e
       /* Cut away the filename part.  */
a85e8e
       dirfile = grub_strrchr (dir, '/');
a85e8e
-      dirfile[1] = '\0';
a85e8e
+      if (dirfile)
a85e8e
+	dirfile[1] = '\0';
a85e8e
 
a85e8e
       /* Iterate the directory.  */
a85e8e
       (fs->dir) (dev, dir, iterate_dir, NULL);
6b3c76
-- 
6b3c76
2.13.5
6b3c76