summaryrefslogtreecommitdiff
path: root/tests/compat_testutil.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2022-12-31 13:55:11 -0800
committerGarrett D'Amore <garrett@damore.org>2022-12-31 13:55:11 -0800
commit539e559e65cd8f227c45e4b046ac41c0edcf6c32 (patch)
tree36eb234d9511bdcc0edf29a4a1a31b427be929fb /tests/compat_testutil.c
parentf26ddeb81a5ea9d316444951f54a2a017db70482 (diff)
downloadnng-539e559e65cd8f227c45e4b046ac41c0edcf6c32.tar.gz
nng-539e559e65cd8f227c45e4b046ac41c0edcf6c32.tar.bz2
nng-539e559e65cd8f227c45e4b046ac41c0edcf6c32.zip
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.)
Diffstat (limited to 'tests/compat_testutil.c')
-rw-r--r--tests/compat_testutil.c4
1 files changed, 2 insertions, 2 deletions
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 <franklinmathieu@gmail.com>
- Copyright 2018 Staysail Systems, Inc. <info@staysail.tech>
Copyright 2018 Capitar IT Group BV <info@capitar.com>
+ Copyright 2022 Staysail Systems, Inc. <info@staysail.tech>
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 *);