mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-03 12:44:45 +02:00
DecodePolicyOID - check out index
This commit is contained in:
@@ -7792,7 +7792,7 @@ int DecodePolicyOID(char *out, word32 outSz, const byte *in, word32 inSz)
|
|||||||
outIdx += w;
|
outIdx += w;
|
||||||
val = 0;
|
val = 0;
|
||||||
|
|
||||||
do {
|
while (inIdx < inSz && outIdx < outSz) {
|
||||||
/* extract the next OID digit from in to val */
|
/* extract the next OID digit from in to val */
|
||||||
/* first bit is used to set if value is coded on 1 or multiple bytes */
|
/* first bit is used to set if value is coded on 1 or multiple bytes */
|
||||||
if (in[inIdx] & 0x80) {
|
if (in[inIdx] & 0x80) {
|
||||||
@@ -7809,7 +7809,9 @@ int DecodePolicyOID(char *out, word32 outSz, const byte *in, word32 inSz)
|
|||||||
val = 0;
|
val = 0;
|
||||||
}
|
}
|
||||||
inIdx++;
|
inIdx++;
|
||||||
} while (inIdx < inSz);
|
}
|
||||||
|
if (outIdx == outSz)
|
||||||
|
outIdx--;
|
||||||
out[outIdx] = 0;
|
out[outIdx] = 0;
|
||||||
|
|
||||||
w = (int)outIdx;
|
w = (int)outIdx;
|
||||||
|
Reference in New Issue
Block a user