Skip to contentSkip to conversation

Fix crash on http

PATCH In review Javier Martinez Canillas 2 participants 2 messages Sep 17, 2019 – Sep 18, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix crash on http

From: Gustavo Luiz Duarte <[email protected]>

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

---

 grub-core/net/http.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
grub-core/net/http.c +1 -1
index 5aa4ad3befc..ec3647f9a0c 100644
@@ -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)
     {
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Javier Martinez Canillas

From: Gustavo Luiz Duarte <[email protected]>

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

If there are no objections I will push that patch, together with the patches reviewed this week and earlier, on the beginning of next week. Well, sounds weird but I hope that you know what I mean... :-)))

Daniel