mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Fix clang 3.1 compile warning in crypto.c
(Tweaked by nickm)
This commit is contained in:
parent
bf16e167f7
commit
a5a8296892
4
changes/bug5969
Normal file
4
changes/bug5969
Normal file
@ -0,0 +1,4 @@
|
||||
o Minor bugfixes:
|
||||
- Fix a compile warning in crypto.c when compiling with clang 3.1.
|
||||
Fixes bug 5969, bugfix on 0.2.3.9-alpha.
|
||||
|
@ -1806,7 +1806,6 @@ crypto_get_stored_dynamic_dh_modulus(const char *fname)
|
||||
char *contents = NULL;
|
||||
const char *contents_tmp = NULL;
|
||||
int dh_codes;
|
||||
char *fname_new = NULL;
|
||||
DH *stored_dh = NULL;
|
||||
BIGNUM *dynamic_dh_modulus = NULL;
|
||||
int length = 0;
|
||||
@ -1881,12 +1880,10 @@ crypto_get_stored_dynamic_dh_modulus(const char *fname)
|
||||
|
||||
err:
|
||||
|
||||
{ /* move broken prime to $filename.broken */
|
||||
fname_new = tor_malloc(strlen(fname) + 8);
|
||||
|
||||
/* no can do if these functions return error */
|
||||
strlcpy(fname_new, fname, strlen(fname) + 8);
|
||||
strlcat(fname_new, ".broken", strlen(fname) + 8);
|
||||
{
|
||||
/* move broken prime to $filename.broken */
|
||||
char *fname_new=NULL;
|
||||
tor_asprintf(&fname_new, "%s.broken", fname);
|
||||
|
||||
log_warn(LD_CRYPTO, "Moving broken dynamic DH prime to '%s'.", fname_new);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user