diff options
-rw-r--r-- | onlineupdate/source/libmar/sign/mar_sign.c | 6 | ||||
-rw-r--r-- | onlineupdate/source/libmar/verify/mar_verify.c | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/onlineupdate/source/libmar/sign/mar_sign.c b/onlineupdate/source/libmar/sign/mar_sign.c index 3e7ef205d49c..68bff67acce6 100644 --- a/onlineupdate/source/libmar/sign/mar_sign.c +++ b/onlineupdate/source/libmar/sign/mar_sign.c @@ -262,7 +262,7 @@ strip_signature_block(const char *src, const char * dest) FILE *fpSrc = NULL, *fpDest = NULL; int rv = -1, hasSignatureBlock; char buf[BLOCKSIZE]; - char *indexBuf = NULL, *indexBufLoc; + char *indexBuf = NULL; if (!src || !dest) { fprintf(stderr, "ERROR: Invalid parameter passed in.\n"); @@ -432,7 +432,6 @@ strip_signature_block(const char *src, const char * dest) /* Consume the index and adjust each index by the difference */ indexBuf = malloc(indexLength); - indexBufLoc = indexBuf; if (fread(indexBuf, indexLength, 1, fpSrc) != 1) { fprintf(stderr, "ERROR: Could not read index\n"); goto failure; @@ -836,7 +835,7 @@ mar_repackage_and_sign(const char *NSSConfigDir, char buf[BLOCKSIZE]; SECKEYPrivateKey *privKeys[MAX_SIGNATURES]; CERTCertificate *certs[MAX_SIGNATURES]; - char *indexBuf = NULL, *indexBufLoc; + char *indexBuf = NULL; uint32_t k; memset(signatureLengths, 0, sizeof(signatureLengths)); @@ -1058,7 +1057,6 @@ mar_repackage_and_sign(const char *NSSConfigDir, /* Consume the index and adjust each index by signatureSectionLength */ indexBuf = malloc(indexLength); - indexBufLoc = indexBuf; if (fread(indexBuf, indexLength, 1, fpSrc) != 1) { fprintf(stderr, "ERROR: Could not read index\n"); goto failure; diff --git a/onlineupdate/source/libmar/verify/mar_verify.c b/onlineupdate/source/libmar/verify/mar_verify.c index c9f715a4dc65..c07ca20f88a3 100644 --- a/onlineupdate/source/libmar/verify/mar_verify.c +++ b/onlineupdate/source/libmar/verify/mar_verify.c @@ -13,6 +13,7 @@ #include <fcntl.h> #include <stdlib.h> #include <string.h> +#include <assert.h> #include "mar_private.h" #include "mar.h" #include "cryptox.h" @@ -197,7 +198,6 @@ mar_extract_and_verify_signatures_fp(FILE *fp, uint32_t signatureCount, signatureLen, numVerified = 0; uint32_t signatureAlgorithmIDs[MAX_SIGNATURES]; int rv = -1; - int64_t curPos; uint8_t *extractedSignatures[MAX_SIGNATURES]; uint32_t i; @@ -285,7 +285,6 @@ mar_extract_and_verify_signatures_fp(FILE *fp, } } - curPos = ftello(fp); rv = mar_verify_signatures_for_fp(fp, provider, keys, @@ -299,6 +298,7 @@ mar_extract_and_verify_signatures_fp(FILE *fp, /* If we reached here and we verified every signature, return success. */ if (numVerified == signatureCount && keyCount == numVerified) { + assert(rv == 0); (void) rv; return CryptoX_Success; } |