All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix crash on http
@ 2012-09-27 17:55 Gustavo Luiz Duarte
  2013-02-01 20:55 ` Vladimir 'φ-coder/phcoder' Serbinenko
  0 siblings, 1 reply; 4+ messages in thread
From: Gustavo Luiz Duarte @ 2012-09-27 17:55 UTC (permalink / raw)
  To: grub-devel


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.
Downstream bug: http://bugzilla.redhat.com/show_bug.cgi?id=860834
---
 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 a7542d1..a5f6f31 100644
--- a/grub-core/net/http.c
+++ b/grub-core/net/http.c
@@ -386,7 +386,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.7.11.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH] Fix crash on http
@ 2019-09-17 15:44 Javier Martinez Canillas
  2019-09-18 12:24 ` Daniel Kiper
  0 siblings, 1 reply; 4+ messages in thread
From: Javier Martinez Canillas @ 2019-09-17 15:44 UTC (permalink / raw)
  To: grub-devel
  Cc: Gustavo Luiz Duarte, Javier Martinez Canillas,
	Vladimir Serbinenko, Daniel Kiper

From: Gustavo Luiz Duarte <gustavold@linux.vnet.ibm.com>

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 <gustavold@linux.vnet.ibm.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---

 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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-18 12:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-27 17:55 [PATCH] Fix crash on http Gustavo Luiz Duarte
2013-02-01 20:55 ` Vladimir 'φ-coder/phcoder' Serbinenko
  -- strict thread matches above, loose matches on Subject: below --
2019-09-17 15:44 Javier Martinez Canillas
2019-09-18 12:24 ` Daniel Kiper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.