[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/10] net/http: Check result of grub_netbuff_put() in http_recei
From: |
Michael Chang |
Subject: |
[PATCH 01/10] net/http: Check result of grub_netbuff_put() in http_receive() |
Date: |
Mon, 16 Dec 2024 16:03:30 +0800 |
From: Robbie Harwood <rharwood@redhat.com>
Co-authored-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Signed-off-by: Michael Chang <mchang@suse.com>
---
grub-core/net/http.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/grub-core/net/http.c b/grub-core/net/http.c
index f389bf03d..69b629695 100644
--- a/grub-core/net/http.c
+++ b/grub-core/net/http.c
@@ -291,7 +291,9 @@ http_receive (grub_net_tcp_socket_t sock __attribute__
((unused)),
nb2 = grub_netbuff_alloc (data->chunk_rem);
if (!nb2)
return grub_errno;
- grub_netbuff_put (nb2, data->chunk_rem);
+ err = grub_netbuff_put (nb2, data->chunk_rem);
+ if (err)
+ return grub_errno;
grub_memcpy (nb2->data, nb->data, data->chunk_rem);
if (file->device->net->packs.count >= 20)
{
--
2.47.1
- [PATCH 00/10] Support UEFI HTTP boot with IPv6 and DNS, Michael Chang, 2024/12/16
- [PATCH 01/10] net/http: Check result of grub_netbuff_put() in http_receive(),
Michael Chang <=
- [PATCH 02/10] efinet: Add structures for PXE messages, Michael Chang, 2024/12/16
- [PATCH 04/10] grub.texi: Add net_dhcp6 document, Michael Chang, 2024/12/16
- [PATCH 05/10] bootp: Process DHCPACK packet during HTTP Boot, Michael Chang, 2024/12/16
- [PATCH 03/10] efinet + bootp: add net_dhcp6 command supporting dhcpv6, Michael Chang, 2024/12/16
- [PATCH 06/10] efinet: Configure network from UEFI device path, Michael Chang, 2024/12/16
- [PATCH 07/10] efinet: Set DNS server from UEFI protocol, Michael Chang, 2024/12/16
- [PATCH 08/10] kern/efi/efi: Print URI and DNS device path info, Michael Chang, 2024/12/16
- [PATCH 09/10] kern/efi/efi: Correct endianness in IPv6 device path, Michael Chang, 2024/12/16
- [PATCH 10/10] bootp: Fix logical operator in DHCP option overload check, Michael Chang, 2024/12/16