mirror of https://github.com/FreeRDP/FreeRDP
winpr: update WinPrAsn1DecReadContextualOctetString to use common code
This commit is contained in:
parent
5f3bc5842a
commit
48abc64a6d
|
@ -1395,13 +1395,10 @@ size_t WinPrAsn1DecReadContextualOctetString(WinPrAsn1Decoder* dec, WinPrAsn1_ta
|
|||
BOOL allocate)
|
||||
{
|
||||
size_t ret, ret2;
|
||||
WinPrAsn1_tag ftag;
|
||||
WinPrAsn1Decoder content;
|
||||
|
||||
WINPR_ASSERT(error);
|
||||
|
||||
ret = WinPrAsn1DecPeekContextualTag(dec, &ftag, &content);
|
||||
if (!ret || ftag != tagId)
|
||||
ret = readContextualHeader(dec, tagId, error, &content);
|
||||
if (!ret)
|
||||
return 0;
|
||||
|
||||
ret2 = WinPrAsn1DecReadOctetString(&content, target, allocate);
|
||||
|
@ -1411,7 +1408,6 @@ size_t WinPrAsn1DecReadContextualOctetString(WinPrAsn1Decoder* dec, WinPrAsn1_ta
|
|||
return 0;
|
||||
}
|
||||
|
||||
*error = FALSE;
|
||||
Stream_Seek(&dec->source, ret);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue