diff options
author | Jiaxin Wu <Jiaxin.wu@intel.com> | 2018-10-30 11:30:08 +0800 |
---|---|---|
committer | Jiaxin Wu <Jiaxin.wu@intel.com> | 2018-11-01 09:37:41 +0800 |
commit | fd950156738ce878c0ba29af99da2ffcac5168e1 (patch) | |
tree | c40830d5ee5567f33eb627b0214c1b9c3ee55708 /NetworkPkg | |
parent | c41da21704e1b43fbe3de3c04cf5e6abf8614993 (diff) | |
download | edk2-fd950156738ce878c0ba29af99da2ffcac5168e1.zip edk2-fd950156738ce878c0ba29af99da2ffcac5168e1.tar.gz edk2-fd950156738ce878c0ba29af99da2ffcac5168e1.tar.bz2 |
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>
Diffstat (limited to 'NetworkPkg')
-rw-r--r-- | NetworkPkg/TlsDxe/TlsImpl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/NetworkPkg/TlsDxe/TlsImpl.c b/NetworkPkg/TlsDxe/TlsImpl.c index ea83dbd..2d4169b 100644 --- a/NetworkPkg/TlsDxe/TlsImpl.c +++ b/NetworkPkg/TlsDxe/TlsImpl.c @@ -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);
|