bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/4] Fix crash on http


From: Lubomir Rintel
Subject: [PATCH 1/4] Fix crash on http
Date: Mon, 20 Jan 2014 22:32:34 +0100

From: Gustavo Luiz Duarte <address@hidden>

Don't free file->data on receiving FIN flag since it is used all over without
checking. http_close() will be called later to free that memory.

Link: https://bugzilla.redhat.com/show_bug.cgi?id=860834
Link: http://lists.gnu.org/archive/html/grub-devel/2012-09/msg00081.html

address@hidden: Add Changelog]
---
 ChangeLog            | 6 ++++++
 grub-core/net/http.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 10abfe2..c91689e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-01-20  Gustavo Luiz Duarte  <address@hidden>
+
+       * grub-core/net/http.c (http_establish): Don't free file->data on
+       receiving FIN flag since it is used all over without
+       checking. http_close() will be called later to free that memory.
+
 2014-01-19  Colin Watson  <address@hidden>
 
        * grub-core/osdep/freebsd/hostdisk.c (grub_util_fd_open): Ignore
diff --git a/grub-core/net/http.c b/grub-core/net/http.c
index 4684f8b..ef9538c 100644
--- a/grub-core/net/http.c
+++ b/grub-core/net/http.c
@@ -393,7 +393,7 @@ http_establish (struct grub_file *file, grub_off_t offset, 
int initial)
 
   data->sock = grub_net_tcp_open (file->device->net->server,
                                  HTTP_PORT, http_receive,
-                                 http_err, http_err,
+                                 http_err, NULL,
                                  file);
   if (!data->sock)
     {
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]