Fix usage of sprintf.

sprintf is marked as deprecated with Xcode 14.

Bug: chromium:1331345
Change-Id: Ib7eb7ab829457f3ef5fcad44b43fe827359ad7d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265200
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Justin Cohen <justincohen@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37136}
This commit is contained in:
Justin Cohen
2022-06-06 22:51:50 -04:00
committed by WebRTC LUCI CQ
parent eef9d5d6e1
commit 45d66a59d6

View File

@ -305,7 +305,7 @@ HttpAuthResult HttpAuthenticate(absl::string_view challenge,
std::string cnonce, ncount;
char buffer[256];
sprintf(buffer, "%d", static_cast<int>(time(0)));
snprintf(buffer, sizeof(buffer), "%d", static_cast<int>(time(0)));
cnonce = MD5(buffer);
ncount = "00000001";