diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-03-15 20:11:21 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-15 20:11:21 +0100 |
| commit | db40e9a10b22085d124521763a8f12a290ba76f7 (patch) | |
| tree | eeaac2c5eca4dea165579664a230dc7c023b7cc8 /src/lib/digester.cc | |
| parent | 577f44adc98c39e7e4fe0a1d8db103ce7f15d1e5 (diff) | |
Replace use of sprintf with snprintf.
Diffstat (limited to 'src/lib/digester.cc')
| -rw-r--r-- | src/lib/digester.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/digester.cc b/src/lib/digester.cc index 8542c75a1..09214c3de 100644 --- a/src/lib/digester.cc +++ b/src/lib/digester.cc @@ -67,7 +67,7 @@ Digester::get () const char hex[MD5_DIGEST_SIZE * 2 + 1]; for (int i = 0; i < MD5_DIGEST_SIZE; ++i) { - sprintf(hex + i * 2, "%02x", digest[i]); + snprintf(hex + i * 2, MD5_DIGEST_SIZE * 2 + 1, "%02x", digest[i]); } _digest = hex; |
