Skip to content

Commit f471330

Browse files
authored
Merge pull request #234 from google/FF0F89A9FFB90668CB5E5C968FD01756
(AUTOMATIC) opensource update
2 parents 4bd5f22 + 9eca178 commit f471330

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cpp/src/validating_util.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ bool UnwrapHeader(const char* header_prefix,
8484
void ValidatingUtil::Wrap(time_t timestamp, std::string* data) {
8585
assert(data != nullptr);
8686
char timestamp_string[2 + 3 * sizeof timestamp];
87-
int size =
88-
std::sprintf(timestamp_string, "%ld", static_cast<long>(timestamp));
87+
int size = std::snprintf(timestamp_string, sizeof(timestamp_string), "%ld",
88+
static_cast<long>(timestamp));
8989
assert(size > 0);
9090
assert(size < sizeof timestamp_string);
9191
(void)size;

0 commit comments

Comments
 (0)