Blame SOURCES/0261-Fix-one-more-coverity-complaint.patch
|
|
d41074 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
a85e8e |
From: Peter Jones <pjones@redhat.com>
|
|
|
a85e8e |
Date: Thu, 25 May 2017 11:27:40 -0400
|
|
|
d41074 |
Subject: [PATCH] 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
|
|
|
d41074 |
index 2c9b9e9312a..93aa0d8eda8 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);
|