Add error verification in netbuff operations.
This commit is contained in:
parent
d6d205568f
commit
d855fbcf37
7 changed files with 38 additions and 19 deletions
|
@ -85,7 +85,10 @@ grub_err_t
|
|||
grub_net_recv_ip_packets (struct grub_net_buff *nb)
|
||||
{
|
||||
struct iphdr *iph = (struct iphdr *) nb->data;
|
||||
grub_netbuff_pull (nb, sizeof (*iph));
|
||||
grub_err_t err;
|
||||
|
||||
if ((err = grub_netbuff_pull (nb, sizeof (*iph))) != GRUB_ERR_NONE)
|
||||
return err;
|
||||
|
||||
switch (iph->protocol)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue