Hi Siyuan,
Maybe we can add more check for the Len to return directly, what do you think?
if (Len == 0) {
return 0;
}
> + if (Nbuf->TotalSize == 0) {
> +return 0;
> + }
Thanks,
Jiaxin
> -Original Message-
> From: Fu, Siyuan
> Sent: Wednesday, September 20, 2017 11:24 AM
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
Cc: Wu Jiaxin
2 matches
Mail list logo