Merge pull request #2670 from SparkiDev/dec_pol_oid_fix
DecodePolicyOID - check out index
This commit is contained in:
commit
ff026efe49
@ -7801,7 +7801,7 @@ int DecodePolicyOID(char *out, word32 outSz, const byte *in, word32 inSz)
|
||||
outIdx += w;
|
||||
val = 0;
|
||||
|
||||
do {
|
||||
while (inIdx < inSz && outIdx < outSz) {
|
||||
/* extract the next OID digit from in to val */
|
||||
/* first bit is used to set if value is coded on 1 or multiple bytes */
|
||||
if (in[inIdx] & 0x80) {
|
||||
@ -7818,7 +7818,9 @@ int DecodePolicyOID(char *out, word32 outSz, const byte *in, word32 inSz)
|
||||
val = 0;
|
||||
}
|
||||
inIdx++;
|
||||
} while (inIdx < inSz);
|
||||
}
|
||||
if (outIdx == outSz)
|
||||
outIdx--;
|
||||
out[outIdx] = 0;
|
||||
|
||||
w = (int)outIdx;
|
||||
|
Loading…
x
Reference in New Issue
Block a user