summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Taubert <ttaubert@mozilla.com>2016-02-09 18:07:35 +0100
committerTim Taubert <ttaubert@mozilla.com>2016-02-09 18:07:35 +0100
commit4b09926ae063e7d03b285c9c42469b6c79ff2fd2 (patch)
treecc3d4f5f489239b6473f3ebf988a05445661954e
parent4c5f9027709c6e681e050d2ad510716263b57841 (diff)
downloadnss-hg-4b09926ae063e7d03b285c9c42469b6c79ff2fd2.tar.gz
Bug 917571 - Declare variables at the top of the function to fix Windows bustage r=me
-rw-r--r--lib/freebl/chacha20poly1305.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/freebl/chacha20poly1305.c b/lib/freebl/chacha20poly1305.c
index cc36352fa..e5d0310fb 100644
--- a/lib/freebl/chacha20poly1305.c
+++ b/lib/freebl/chacha20poly1305.c
@@ -142,6 +142,7 @@ ChaCha20Poly1305_Open(const ChaCha20Poly1305Context *ctx, unsigned char *output,
{
unsigned char block[64];
unsigned char tag[16];
+ unsigned int ciphertextLen;
if (nonceLen != 12) {
PORT_SetError(SEC_ERROR_INPUT_LEN);
@@ -151,7 +152,7 @@ ChaCha20Poly1305_Open(const ChaCha20Poly1305Context *ctx, unsigned char *output,
PORT_SetError(SEC_ERROR_INPUT_LEN);
return SECFailure;
}
- unsigned int ciphertextLen = inputLen - ctx->tagLen;
+ ciphertextLen = inputLen - ctx->tagLen;
*outputLen = ciphertextLen;
if (maxOutputLen < *outputLen) {
PORT_SetError(SEC_ERROR_OUTPUT_LEN);