@@ -4880,16 +4880,14 @@ static int ParseRSAPubKey(WOLFSSH *ssh,
48804880 byte* n;
48814881 word32 nSz;
48824882 word32 pubKeyIdx = 0;
4883- word32 scratch;
48844883
48854884 ret = wc_InitRsaKey(&sigKeyBlock_ptr->sk.rsa.key, ssh->ctx->heap);
48864885 if (ret != 0)
48874886 ret = WS_RSA_E;
4888- if (ret == 0)
4889- ret = GetUint32(&scratch, pubKey, pubKeySz, &pubKeyIdx);
4890- /* This is the algo name. */
4887+ /* Skip the algo name. */
4888+ if ( ret == WS_SUCCESS)
4889+ ret = GetSkip(pubKey, pubKeySz, &pubKeyIdx);
48914890 if (ret == WS_SUCCESS) {
4892- pubKeyIdx += scratch;
48934891 ret = GetUint32(&eSz, pubKey, pubKeySz, &pubKeyIdx);
48944892 if (ret == WS_SUCCESS && eSz > pubKeySz - pubKeyIdx)
48954893 ret = WS_BUFFER_E;
@@ -4932,7 +4930,6 @@ static int ParseECCPubKey(WOLFSSH *ssh,
49324930 const byte* q;
49334931 word32 qSz, pubKeyIdx = 0;
49344932 int primeId = 0;
4935- word32 scratch;
49364933
49374934 ret = wc_ecc_init_ex(&sigKeyBlock_ptr->sk.ecc.key, ssh->ctx->heap,
49384935 INVALID_DEVID);
@@ -4958,12 +4955,10 @@ static int ParseECCPubKey(WOLFSSH *ssh,
49584955
49594956 /* Skip the curve name since we're getting it from the algo. */
49604957 if (ret == WS_SUCCESS)
4961- ret = GetUint32(&scratch, pubKey, pubKeySz, &pubKeyIdx);
4958+ ret = GetSkip( pubKey, pubKeySz, &pubKeyIdx);
49624959
4963- if (ret == WS_SUCCESS) {
4964- pubKeyIdx += scratch;
4960+ if (ret == WS_SUCCESS)
49654961 ret = GetStringRef(&qSz, &q, pubKey, pubKeySz, &pubKeyIdx);
4966- }
49674962
49684963 if (ret == WS_SUCCESS) {
49694964 ret = wc_ecc_import_x963_ex(q, qSz,
@@ -9407,7 +9402,7 @@ static int DoChannelFailure(WOLFSSH* ssh, byte* buf, word32 len, word32* idx)
94079402
94089403 WLOG(WS_LOG_DEBUG, "Entering DoChannelFailure()");
94099404
9410- if (ssh == NULL || buf == NULL || len ! = 0 || idx == NULL)
9405+ if (ssh == NULL || buf == NULL || len = = 0 || idx == NULL)
94119406 ret = WS_BAD_ARGUMENT;
94129407
94139408 if (ret == WS_SUCCESS)
0 commit comments