From: Robbie Harwood <[email protected]>
Co-authored-by: Peter Jones <[email protected]>
Signed-off-by: Peter Jones <[email protected]>
Signed-off-by: Robbie Harwood <[email protected]>
Signed-off-by: Michael Chang <[email protected]>
---
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
_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel