[core,gateway] fix reading TSG strings

The [MS-TSGU] 2.2.9.2.1.6 TSG_PACKET_QUARENC_RESPONSE::certChainLen
represents the number of WCHAR not the size in bytes.
This commit is contained in:
Armin Novak 2024-07-03 15:36:37 +02:00
parent fbc0d161ca
commit 7a245a5949
No known key found for this signature in database
GPG Key ID: 2CF4A2D2D3D72105
1 changed files with 3 additions and 1 deletions

View File

@ -629,7 +629,9 @@ static BOOL tsg_ndr_read_quarenc_data(wLog* log, wStream* s, UINT32* index,
if (quarenc->certChainLen > 0)
{
if (!tsg_ndr_read_string(log, s, &quarenc->certChainData, quarenc->certChainLen))
/* [MS-TSGU] 2.2.9.2.1.6 TSG_PACKET_QUARENC_RESPONSE::certChainLen number of WCHAR */
if (!tsg_ndr_read_string(log, s, &quarenc->certChainData,
quarenc->certChainLen * sizeof(WCHAR)))
return FALSE;
/* 4-byte alignment */
if (!tsg_stream_align(log, s, 4))