mirror of https://github.com/acidanthera/audk.git
MdeModulePkg/DxeNetLib: Fix an error in packet length counting.
* In old implementation, the operation len-- assumes AsciiSPrint() has counted NULL terminator, and it's not correct. This patch is to fix this issue. Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Ye Ting <ting.ye@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wang Fan <fan.wang@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
parent
cf4a8fa455
commit
c5fcec8c3f
|
@ -403,7 +403,6 @@ SyslogBuildPacket (
|
|||
Time.Minute,
|
||||
Time.Second
|
||||
);
|
||||
Len--;
|
||||
|
||||
Len += (UINT32) AsciiSPrint (
|
||||
Buf + Len,
|
||||
|
@ -414,7 +413,7 @@ SyslogBuildPacket (
|
|||
Line,
|
||||
File
|
||||
);
|
||||
Len--;
|
||||
Len ++;
|
||||
|
||||
//
|
||||
// OK, patch the IP length/checksum and UDP length fields.
|
||||
|
|
Loading…
Reference in New Issue