grub2/0120-Fix-one-more-coverity-complaint.patch
Javier Martinez Canillas 7e98da058f
Cleanup our patchset to reduce the number of patches
This change reorganizes and cleanups our patches to reduce the patch number
from 314 patches to 187. That's achieved by dropping patches that are later
reverted and squashing fixes for earlier patches that introduced features.

There are no code changes and the diff with upstream is the same before and
after the cleanup. Having fewer patches makes easier to manage the patchset
and also will ease to rebase them on top of the latest grub-2.04 release.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
2019-07-16 12:30:06 +02:00

27 lines
909 B
Diff

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