diff options
Diffstat (limited to 'src/interface')
| -rw-r--r-- | src/interface/efi/efi_snp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/interface/efi/efi_snp.c b/src/interface/efi/efi_snp.c index 88072aa65..6d7865dd2 100644 --- a/src/interface/efi/efi_snp.c +++ b/src/interface/efi/efi_snp.c @@ -590,7 +590,8 @@ efi_snp_transmit ( EFI_SIMPLE_NETWORK_PROTOCOL *snp, /* Allocate buffer */ ll_headroom = ( MAX_LL_HEADER_LEN - ll_header_len ); - iobuf = alloc_iob ( ll_headroom + len ); + iobuf = alloc_iob ( ll_headroom + + ( ( len > IOB_ZLEN ) ? len : IOB_ZLEN ) ); if ( ! iobuf ) { DBGC ( snpdev, "SNPDEV %p TX could not allocate %ld-byte " "buffer\n", snpdev, ( ( unsigned long ) len ) ); |
