mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
Merge pull request #878 from cconlon/serialfix
skip removal of leading zero in GetASNInt() when INTEGER is only a si…
This commit is contained in:
@@ -729,7 +729,8 @@ static int GetASNInt(const byte* input, word32* inOutIdx, int* len,
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (*len > 0) {
|
if (*len > 0) {
|
||||||
if (input[*inOutIdx] == 0x00) {
|
/* remove leading zero, unless there is only one 0x00 byte */
|
||||||
|
if ((input[*inOutIdx] == 0x00) && (*len > 1)) {
|
||||||
(*inOutIdx)++;
|
(*inOutIdx)++;
|
||||||
(*len)--;
|
(*len)--;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user