grub-devel
[Top][All Lists]
Advanced

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

[PATCH] Fix crash on http


From: Javier Martinez Canillas
Subject: [PATCH] Fix crash on http
Date: Tue, 17 Sep 2019 17:44:58 +0200

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.

https://bugzilla.redhat.com/show_bug.cgi?id=860834

Signed-off-by: Gustavo Luiz Duarte <address@hidden>
Signed-off-by: Javier Martinez Canillas <address@hidden>
---

 grub-core/net/http.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/net/http.c b/grub-core/net/http.c
index 5aa4ad3befc..ec3647f9a0c 100644
--- a/grub-core/net/http.c
+++ b/grub-core/net/http.c
@@ -392,7 +392,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)
     {
-- 
2.21.0




reply via email to

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