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