fix clang static analyzer warnings/errors - see #217
This commit is contained in:
@@ -899,7 +899,7 @@ int anubis_setup(const unsigned char *key, int keylen, int num_rounds, symmetri
|
||||
{
|
||||
int N, R, i, pos, r;
|
||||
ulong32 kappa[MAX_N];
|
||||
ulong32 inter[MAX_N];
|
||||
ulong32 inter[MAX_N] = { 0 }; /* initialize as all zeroes */
|
||||
ulong32 v, K0, K1, K2, K3;
|
||||
|
||||
LTC_ARGCHK(key != NULL);
|
||||
|
||||
@@ -144,7 +144,7 @@ int ccm_memory(int cipher,
|
||||
}
|
||||
|
||||
/* initialize buffer for pt */
|
||||
if (direction == CCM_DECRYPT) {
|
||||
if (direction == CCM_DECRYPT && ptlen > 0) {
|
||||
pt_work = XMALLOC(ptlen);
|
||||
if (pt_work == NULL) {
|
||||
goto error;
|
||||
|
||||
@@ -49,7 +49,7 @@ static int char_to_int(unsigned char x)
|
||||
int der_decode_utctime(const unsigned char *in, unsigned long *inlen,
|
||||
ltc_utctime *out)
|
||||
{
|
||||
unsigned char buf[32];
|
||||
unsigned char buf[32] = { 0 }; /* initialize as all zeroes */
|
||||
unsigned long x;
|
||||
int y;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user