Fix possible unterminated string

This commit is contained in:
Stuart D. Gathman 2018-03-14 14:43:09 -04:00
parent 8cc225eaee
commit 221d3208c6

View File

@ -1,6 +1,6 @@
diff -up ./crypto/CryptoAuth.c.warnings ./crypto/CryptoAuth.c
--- ./crypto/CryptoAuth.c.warnings 2017-02-21 17:56:22.000000000 -0500
+++ ./crypto/CryptoAuth.c 2017-02-24 12:36:55.762819179 -0500
--- ./crypto/CryptoAuth.c.warnings 2018-01-30 19:04:59.000000000 -0500
+++ ./crypto/CryptoAuth.c 2018-03-14 14:38:20.689851389 -0400
@@ -85,6 +85,8 @@ static inline void getSharedSecret(uint8
uint8_t passwordHash[32],
struct Log* logger)
@ -19,8 +19,8 @@ diff -up ./crypto/CryptoAuth.c.warnings ./crypto/CryptoAuth.c
uint8_t myPublicKeyHex[65];
printHexPubKey(myPublicKeyHex, myPrivateKey);
diff -up ./dht/CJDHTConstants.h.warnings ./dht/CJDHTConstants.h
--- ./dht/CJDHTConstants.h.warnings 2017-02-21 17:56:22.000000000 -0500
+++ ./dht/CJDHTConstants.h 2017-02-24 12:36:55.762819179 -0500
--- ./dht/CJDHTConstants.h.warnings 2018-01-30 19:04:59.000000000 -0500
+++ ./dht/CJDHTConstants.h 2018-03-14 14:38:20.689851389 -0400
@@ -17,7 +17,9 @@
#include "benc/String.h"
@ -40,8 +40,8 @@ diff -up ./dht/CJDHTConstants.h.warnings ./dht/CJDHTConstants.h
+#pragma GCC diagnostic pop
#endif
diff -up ./node_build/dependencies/libuv/test/test-getsockname.c.warnings ./node_build/dependencies/libuv/test/test-getsockname.c
--- ./node_build/dependencies/libuv/test/test-getsockname.c.warnings 2017-02-21 17:56:22.000000000 -0500
+++ ./node_build/dependencies/libuv/test/test-getsockname.c 2017-02-24 12:36:55.763819191 -0500
--- ./node_build/dependencies/libuv/test/test-getsockname.c.warnings 2018-01-30 19:04:59.000000000 -0500
+++ ./node_build/dependencies/libuv/test/test-getsockname.c 2018-03-14 14:38:20.690851402 -0400
@@ -18,7 +18,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
@ -52,9 +52,9 @@ diff -up ./node_build/dependencies/libuv/test/test-getsockname.c.warnings ./node
#include "task.h"
diff -up ./util/Gcc.h.warnings ./util/Gcc.h
--- ./util/Gcc.h.warnings 2017-02-24 12:41:36.926182554 -0500
+++ ./util/Gcc.h 2017-02-24 13:06:44.166644855 -0500
@@ -40,6 +40,11 @@
--- ./util/Gcc.h.warnings 2018-01-30 19:04:59.000000000 -0500
+++ ./util/Gcc.h 2018-03-14 14:38:20.690851402 -0400
@@ -52,6 +52,11 @@
#define Gcc_USE_RET \
__attribute__ ((warn_unused_result))
@ -66,7 +66,7 @@ diff -up ./util/Gcc.h.warnings ./util/Gcc.h
#elif defined(__clang__)
#define Gcc_NORETURN \
@@ -50,6 +55,9 @@
@@ -62,6 +67,9 @@
#endif
@ -77,8 +77,8 @@ diff -up ./util/Gcc.h.warnings ./util/Gcc.h
#define Gcc_PRINTF( format_idx, arg_idx )
#endif
diff -up ./util/platform/netdev/NetPlatform_linux.c.warnings ./util/platform/netdev/NetPlatform_linux.c
--- ./util/platform/netdev/NetPlatform_linux.c.warnings 2017-02-21 17:56:22.000000000 -0500
+++ ./util/platform/netdev/NetPlatform_linux.c 2017-02-24 14:55:11.354136283 -0500
--- ./util/platform/netdev/NetPlatform_linux.c.warnings 2018-01-30 19:04:59.000000000 -0500
+++ ./util/platform/netdev/NetPlatform_linux.c 2018-03-14 14:42:14.668850488 -0400
@@ -36,6 +36,7 @@
#include <linux/route.h>
#if ! defined(android)
@ -87,7 +87,16 @@ diff -up ./util/platform/netdev/NetPlatform_linux.c.warnings ./util/platform/net
#endif
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
@@ -165,7 +166,7 @@ void NetPlatform_addAddress(const char*
@@ -78,7 +79,7 @@ static int socketForIfName(const char* i
}
memset(ifRequestOut, 0, sizeof(struct ifreq));
- strncpy(ifRequestOut->ifr_name, interfaceName, IFNAMSIZ);
+ strncpy(ifRequestOut->ifr_name, interfaceName, IFNAMSIZ - 1);
if (ioctl(s, SIOCGIFINDEX, ifRequestOut) < 0) {
int err = errno;
@@ -167,7 +168,7 @@ void NetPlatform_addAddress(const char*
Except_throw(eh, "ioctl(SIOCSIFADDR) failed: [%s]", strerror(err));
}
@ -97,8 +106,8 @@ diff -up ./util/platform/netdev/NetPlatform_linux.c.warnings ./util/platform/net
memcpy(&sin.sin_addr, &x, 4);
memcpy(&ifRequest.ifr_addr, &sin, sizeof(struct sockaddr_in));
diff -up ./util/platform/Sockaddr.c.warnings ./util/platform/Sockaddr.c
--- ./util/platform/Sockaddr.c.warnings 2017-02-21 17:56:22.000000000 -0500
+++ ./util/platform/Sockaddr.c 2017-02-24 12:36:55.763819191 -0500
--- ./util/platform/Sockaddr.c.warnings 2018-01-30 19:04:59.000000000 -0500
+++ ./util/platform/Sockaddr.c 2018-03-14 14:38:20.691851415 -0400
@@ -12,6 +12,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.