Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix static analysis (Infer) complains #462

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gost12sum.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ int hash_stream(gost_hash_ctx * ctx, int fd, char *sum, int hashsize)
int get_line(FILE *f, char *hash, char *filename, int verbose, int *size)
{
int i, len;
char *ptr = filename;
char *ptr;
char *spacepos = NULL;

while (!feof(f)) {
Expand Down
1 change: 1 addition & 0 deletions test_digest.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,7 @@ static int do_mac(int iter, EVP_MAC *mac, const char *plaintext,
}
else
outsize = EVP_MAC_CTX_get_mac_size(ctx);
T(p - params < 4);

T(EVP_MAC_init(ctx, (const unsigned char *)t->key, t->key_size, NULL));
T(EVP_MAC_CTX_set_params(ctx, params));
Expand Down
7 changes: 4 additions & 3 deletions test_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static void err(int eval, const char *fmt, ...)
}

/* Generate simple cert+key pair. Based on req.c */
static struct certkey certgen(const char *algname, const char *paramset)
static void certgen(const char *algname, const char *paramset, struct certkey *ck)
{
/* Keygen. */
EVP_PKEY *tkey;
Expand Down Expand Up @@ -150,7 +150,8 @@ static struct certkey certgen(const char *algname, const char *paramset)
PEM_write_bio_X509(out, x509ss);
BIO_free_all(out);
#endif
return (struct certkey){ .pkey = pkey, .cert = x509ss };
ck->pkey = pkey;
ck->cert = x509ss;
}

/* Non-blocking BIO test mechanic is based on sslapitest.c */
Expand All @@ -164,7 +165,7 @@ int test(const char *algname, const char *paramset)
printf(cNORM "\n");

struct certkey ck;
ck = certgen(algname, paramset);
certgen(algname, paramset, &ck);

SSL_CTX *cctx, *sctx;

Expand Down
Loading