]> TLD Linux GIT Repositories - packages/grub2.git/blob - fix-http-crash.patch
- grub2 from PLD
[packages/grub2.git] / fix-http-crash.patch
1 From 4414df5e72937b0bb1c4a0bb66cd1132ec2a5720 Mon Sep 17 00:00:00 2001
2 From: Gustavo Luiz Duarte <gustavold@linux.vnet.ibm.com>
3 Date: Tue, 25 Sep 2012 18:40:55 -0400
4 Subject: [PATCH] Fix crash on http
5
6 Don't free file->data on receiving FIN flag since it is used all over without
7 checking. http_close() will be called later to free that memory.
8 https://bugzilla.redhat.com/show_bug.cgi?id=860834
9 ---
10  grub-core/net/http.c | 2 +-
11  1 file changed, 1 insertion(+), 1 deletion(-)
12
13 diff --git a/grub-core/net/http.c b/grub-core/net/http.c
14 index a7542d1..a5f6f31 100644
15 --- a/grub-core/net/http.c
16 +++ b/grub-core/net/http.c
17 @@ -386,7 +386,7 @@ http_establish (struct grub_file *file, grub_off_t offset, int initial)
18  
19    data->sock = grub_net_tcp_open (file->device->net->server,
20                                   HTTP_PORT, http_receive,
21 -                                 http_err, http_err,
22 +                                 http_err, NULL,
23                                   file);
24    if (!data->sock)
25      {
26 -- 
27 1.7.11.4
28