mirror of https://github.com/acidanthera/audk.git
NetworkPkg/TlsDxe: Fix failure to process multiple TLS records.
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1290. Current implementation failed to parse the multiple TLS record messages due to the incorrect pointer of TLS record header. This patch is to resolve that problem. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
parent
c41da21704
commit
fd95015673
|
@ -144,7 +144,7 @@ TlsEncryptPacket (
|
|||
BufferOutSize += ThisMessageSize;
|
||||
|
||||
BufferInPtr += TLS_RECORD_HEADER_LENGTH + ThisPlainMessageSize;
|
||||
TempRecordHeader += ThisMessageSize;
|
||||
TempRecordHeader = (TLS_RECORD_HEADER *)((UINT8 *)TempRecordHeader + ThisMessageSize);
|
||||
}
|
||||
|
||||
FreePool (BufferIn);
|
||||
|
@ -317,7 +317,7 @@ TlsDecryptPacket (
|
|||
BufferOutSize += TLS_RECORD_HEADER_LENGTH + ThisPlainMessageSize;
|
||||
|
||||
BufferInPtr += TLS_RECORD_HEADER_LENGTH + ThisCipherMessageSize;
|
||||
TempRecordHeader += TLS_RECORD_HEADER_LENGTH + ThisPlainMessageSize;
|
||||
TempRecordHeader = (TLS_RECORD_HEADER *)((UINT8 *)TempRecordHeader + TLS_RECORD_HEADER_LENGTH + ThisPlainMessageSize);
|
||||
}
|
||||
|
||||
FreePool (BufferIn);
|
||||
|
|
Loading…
Reference in New Issue