From 697f77bef5cf758268f9339e29bd100eae30caa8 Mon Sep 17 00:00:00 2001 From: toddouska Date: Fri, 2 May 2014 11:06:59 -0700 Subject: [PATCH] help coverity with max size issue on unsigned addition --- ctaocrypt/src/tfm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctaocrypt/src/tfm.c b/ctaocrypt/src/tfm.c index cd4e46fd7..5fb6b2efc 100644 --- a/ctaocrypt/src/tfm.c +++ b/ctaocrypt/src/tfm.c @@ -95,7 +95,7 @@ void s_fp_add(fp_int *a, fp_int *b, fp_int *c) register fp_word t; y = MAX(a->used, b->used); - oldused = c->used; + oldused = MAX(c->used, FP_SIZE); /* help static analysis w/ max size */ c->used = y; t = 0;