summaryrefslogtreecommitdiff
path: root/lib/freebl/mpi
diff options
context:
space:
mode:
authorRichard Barnes <rlb@ipv.sx>2016-04-21 08:15:05 +0200
committerRichard Barnes <rlb@ipv.sx>2016-04-21 08:15:05 +0200
commitd1138cc9971f7ec80a337609c53a48cb281c7d2c (patch)
treebb58df8b162d31df2b344a4ac6196c9e616399d7 /lib/freebl/mpi
parent6b279ab67347db6eb4d75679d704fe3cc37c7395 (diff)
downloadnss-hg-d1138cc9971f7ec80a337609c53a48cb281c7d2c.tar.gz
Bug 1256296 - Fix scan-build error in mpmontg.c, r=franziskus,rrelyea
Diffstat (limited to 'lib/freebl/mpi')
-rw-r--r--lib/freebl/mpi/mpmontg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/freebl/mpi/mpmontg.c b/lib/freebl/mpi/mpmontg.c
index 3e1a7a850..a141ae3ab 100644
--- a/lib/freebl/mpi/mpmontg.c
+++ b/lib/freebl/mpi/mpmontg.c
@@ -20,6 +20,7 @@
#include "montmulf.h"
#endif
#include <stddef.h> /* ptrdiff_t */
+#include <assert.h>
#define STATIC
@@ -591,6 +592,8 @@ mp_err weave_to_mpi(mp_int *a, /* out, result */
MP_SIGN(a) = MP_ZPOS;
MP_USED(a) = nDigits;
+ assert(weaved != NULL);
+
/* Fetch the proper column in constant time, indexing over the whole array */
for (i=0; i<nDigits; ++i) {
d = 0;