]> the.earth.li Git - onak.git/blobdiff - sigcheck.c
Fix issues found by llvm scan-build static analysis
[onak.git] / sigcheck.c
index 29ab652e71dda830273b4f45c1bd994094ece9e0..2c1fc4c0871adc3bde0b5de10db26c7a57cd0b65 100644 (file)
@@ -263,6 +263,12 @@ static onak_status_t onak_parse_key_material(struct openpgp_packet *pk,
                return ONAK_E_UNSUPPORTED_FEATURE;
        }
 
+       /*
+        * Keep scan-build happy; we bump this in MPI_TO_MPZ and then don't use
+        * it again the last time we do so.
+        */
+       (void)ofs;
+
        key->type = pk->data[5];
 
        if (ret != ONAK_E_OK) {
@@ -311,7 +317,7 @@ onak_status_t onak_check_hash_sig(struct openpgp_publickey *sigkey,
                }
 
                /* Skip to the signature material */
-               ofs += 19;
+               ofs = 19;
                sigkeytype = sig->data[15];
        } else if (sig->data[0] >= 4) {
                /* Skip the hashed data */