]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/DxeNetLib: Check the actual packet size before trim data from Nbuf.
authorFu Siyuan <siyuan.fu@intel.com>
Wed, 20 Sep 2017 03:21:56 +0000 (11:21 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Thu, 28 Sep 2017 07:36:49 +0000 (15:36 +0800)
commitb07bbb4f73c9d2abbdab5db0b064379981db11bc
treebec21c1d3ae9fad6b62d19e99191abe61cf10440
parent85974aef1332d2d8f480f121875dc57795220dd1
MdeModulePkg/DxeNetLib: Check the actual packet size before trim data from Nbuf.

In NetbufTrim() function, the NetBuf TotalSize should be checked with 0 before
making the trim operation, otherwise the function will fall into infinite loop.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
MdeModulePkg/Library/DxeNetLib/NetBuffer.c