From 539e559e65cd8f227c45e4b046ac41c0edcf6c32 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 31 Dec 2022 13:55:11 -0800 Subject: Fixes for some security complaints. None of these changes are actual security bugs, but GitHub's scanner reports false positives at Critical severity for them. (There are a number of complaints from that scanner, many of which we do not necessarily agree with.) --- tests/compat_testutil.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/compat_testutil.c') diff --git a/tests/compat_testutil.c b/tests/compat_testutil.c index 7db03bf0..1656c852 100644 --- a/tests/compat_testutil.c +++ b/tests/compat_testutil.c @@ -1,8 +1,8 @@ /* Copyright (c) 2013 Insollo Entertainment, LLC. All rights reserved. Copyright 2016 Franklin "Snaipe" Mathieu - Copyright 2018 Staysail Systems, Inc. Copyright 2018 Capitar IT Group BV + Copyright 2022 Staysail Systems, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), @@ -201,7 +201,7 @@ get_test_port(int argc, const char *argv[]) void test_addr_from(char *out, const char *proto, const char *ip, int port) { - sprintf(out, "%s://%s:%d", proto, ip, port); + (void) snprintf(out, 128, "%s://%s:%d", proto, ip, port); } extern int nng_thread_create(void **, void (*)(void *), void *); -- cgit v1.2.3-70-g09d2