Summary:
same motivations as https://github.com/facebook/rocksdb/pull/5475, applied to the last remaining `sprintf`.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/11011
Reviewed By: pdillinger
Differential Revision:
D41673500
Pulled By: ajkr
fbshipit-source-id:
88618ea791cafad86a9a491799c45979d46e3544
// Internal key is constructed directly from this key,
// and internal key size is required to be >= 8 bytes,
// so use %08u as the format string.
- sprintf(k, "%08u", key);
+ snprintf(k, sizeof(k), "%08u", key);
std::string v;
if (mixed_with_human_readable_string_value) {
v = (block % 2) ? rnd.HumanReadableString(256)