Skip to content

Commit 00238a3

Browse files
arvid220ufacebook-github-bot
authored andcommitted
replace sprintf with its safe version snprintf (v2) (#11011)
Summary: same motivations as #5475, applied to the last remaining `sprintf`. Pull Request resolved: #11011 Reviewed By: pdillinger Differential Revision: D41673500 Pulled By: ajkr fbshipit-source-id: 88618ea791cafad86a9a491799c45979d46e3544
1 parent 1078d86 commit 00238a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

table/block_based/block_based_table_reader_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class BlockBasedTableReaderBaseTest : public testing::Test {
5050
// Internal key is constructed directly from this key,
5151
// and internal key size is required to be >= 8 bytes,
5252
// so use %08u as the format string.
53-
sprintf(k, "%08u", key);
53+
snprintf(k, sizeof(k), "%08u", key);
5454
std::string v;
5555
if (mixed_with_human_readable_string_value) {
5656
v = (block % 2) ? rnd.HumanReadableString(256)

0 commit comments

Comments
 (0)