diff options
author | Tor Egge <Tor.Egge@online.no> | 2023-01-31 12:46:10 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2023-01-31 12:46:10 +0100 |
commit | 8dca74eb0879fe0e530c783d74a355747422aeec (patch) | |
tree | 1558b0d553400bf7a4e14ec01e82358ba8cfd1fd /fnet/src/tests | |
parent | 82e48e07e3d93521dfc53993a30d7f25ded4a440 (diff) |
Use snprintf instead of sprintf.
Diffstat (limited to 'fnet/src/tests')
-rw-r--r-- | fnet/src/tests/info/info.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fnet/src/tests/info/info.cpp b/fnet/src/tests/info/info.cpp index 4271546e647..00075cb75dd 100644 --- a/fnet/src/tests/info/info.cpp +++ b/fnet/src/tests/info/info.cpp @@ -44,7 +44,7 @@ TEST("info") { char spec[64]; rpc.Init(&orb); ASSERT_TRUE(orb.Listen("tcp/0")); - sprintf(spec, "tcp/localhost:%d", orb.GetListenPort()); + snprintf(spec, sizeof(spec), "tcp/localhost:%d", orb.GetListenPort()); FRT_Target *target = orb.GetTarget(spec); FRT_RPCRequest *local_info = orb.AllocRPCRequest(); |