grub2/0225-lib-syslinux_parse-Add-missing-error-check.patch
Peter Jones 8c6b1ac71e Reconcile with upstream once again.
Also include some minor fixes for gcc 5.1.1

Signed-off-by: Peter Jones <pjones@redhat.com>
2015-07-22 09:46:32 -04:00

32 lines
964 B
Diff

From 49978c5c4f5a88a8065042133e5d4b7e3c472eaa Mon Sep 17 00:00:00 2001
From: Vladimir Serbinenko <phcoder@gmail.com>
Date: Mon, 26 Jan 2015 09:42:04 +0100
Subject: [PATCH 225/506] lib/syslinux_parse: Add missing error check.
Found by: Coverity scan.
---
grub-core/lib/syslinux_parse.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/grub-core/lib/syslinux_parse.c b/grub-core/lib/syslinux_parse.c
index 1927c4f..f605326 100644
--- a/grub-core/lib/syslinux_parse.c
+++ b/grub-core/lib/syslinux_parse.c
@@ -846,7 +846,12 @@ write_entry (struct output_buffer *outbuf,
{
grub_err_t err;
if (curentry->comments)
- print (outbuf, curentry->comments, grub_strlen (curentry->comments));
+ {
+ err = print (outbuf, curentry->comments,
+ grub_strlen (curentry->comments));
+ if (err)
+ return err;
+ }
{
struct syslinux_say *say;
for (say = curentry->say; say && say->next; say = say->next);
--
2.4.3