diff options
| author | robot-piglet <[email protected]> | 2024-01-31 17:59:10 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2024-01-31 18:43:19 +0300 |
| commit | 812e7e202ea3ff85db090a5c171e542a24f73c88 (patch) | |
| tree | 2d27e71700f179093129d1470b3b081083ef44ec /library/cpp/netliba/v6/udp_http.cpp | |
| parent | 9cde6ebc1cd157b794b58775da2b284b6a3871ae (diff) | |
Intermediate changes
Diffstat (limited to 'library/cpp/netliba/v6/udp_http.cpp')
| -rw-r--r-- | library/cpp/netliba/v6/udp_http.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/cpp/netliba/v6/udp_http.cpp b/library/cpp/netliba/v6/udp_http.cpp index f318554a763..ab4ec52bf9e 100644 --- a/library/cpp/netliba/v6/udp_http.cpp +++ b/library/cpp/netliba/v6/udp_http.cpp @@ -1041,9 +1041,9 @@ namespace NNetliba { char buf[1000]; TRequesterUserQueueSizes* qs = QueueSizes.Get(); - sprintf(buf, "\nRequest queue %d (%d bytes)\n", (int)AtomicGet(qs->ReqCount), (int)AtomicGet(qs->ReqQueueSize)); + snprintf(buf, sizeof(buf), "\nRequest queue %d (%d bytes)\n", (int)AtomicGet(qs->ReqCount), (int)AtomicGet(qs->ReqQueueSize)); res += buf; - sprintf(buf, "Response queue %d (%d bytes)\n", (int)AtomicGet(qs->RespCount), (int)AtomicGet(qs->RespQueueSize)); + snprintf(buf, sizeof(buf), "Response queue %d (%d bytes)\n", (int)AtomicGet(qs->RespCount), (int)AtomicGet(qs->RespQueueSize)); res += buf; const char* outReqStateNames[] = { @@ -1061,7 +1061,7 @@ namespace NNetliba { const TGUID& gg = i->first; const TOutRequestState& s = i->second; bool isSync = SyncRequests.find(gg) != SyncRequests.end(); - sprintf(buf, "%s\t%s %s TimePassed: %g %s\n", + snprintf(buf, sizeof(buf), "%s\t%s %s TimePassed: %g %s\n", GetAddressAsString(s.Address).c_str(), GetGuidAsString(gg).c_str(), outReqStateNames[s.State], s.TimePassed * 1000, isSync ? "isSync" : ""); @@ -1071,7 +1071,7 @@ namespace NNetliba { for (TInRequestHash::const_iterator i = InRequests.begin(); i != InRequests.end(); ++i) { const TGUID& gg = i->first; const TInRequestState& s = i->second; - sprintf(buf, "%s\t%s %s\n", + snprintf(buf, sizeof(buf), "%s\t%s %s\n", GetAddressAsString(s.Address).c_str(), GetGuidAsString(gg).c_str(), inReqStateNames[s.State]); res += buf; } |
