projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix all UBSAN warnings triggered by tests.
[tinc]
/
src
/
net_setup.c
diff --git
a/src/net_setup.c
b/src/net_setup.c
index
d789126
..
a04f953
100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-231,7
+231,7
@@
static bool read_ecdsa_private_key(void) {
return false;
}
return false;
}
- if(s.st_mode & ~0100700) {
+ if(s.st_mode & ~0100700
u
) {
logger(DEBUG_ALWAYS, LOG_WARNING, "Warning: insecure file permissions for Ed25519 private key file `%s'!", fname);
}
logger(DEBUG_ALWAYS, LOG_WARNING, "Warning: insecure file permissions for Ed25519 private key file `%s'!", fname);
}
@@
-323,7
+323,7
@@
static bool read_rsa_private_key(void) {
return false;
}
return false;
}
- if(s.st_mode & ~0100700) {
+ if(s.st_mode & ~0100700
u
) {
logger(DEBUG_ALWAYS, LOG_WARNING, "Warning: insecure file permissions for RSA private key file `%s'!", fname);
}
logger(DEBUG_ALWAYS, LOG_WARNING, "Warning: insecure file permissions for RSA private key file `%s'!", fname);
}
@@
-1330,7
+1330,7
@@
void close_network_connections(void) {
if(myself && myself->connection) {
subnet_update(myself, NULL, false);
if(myself && myself->connection) {
subnet_update(myself, NULL, false);
-
connection_del
(myself->connection);
+
free_connection
(myself->connection);
}
for(int i = 0; i < listen_sockets; i++) {
}
for(int i = 0; i < listen_sockets; i++) {