diff options
author | Patrick Steinhardt <ps@pks.im> | 2018-08-06 12:00:21 +0200 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2018-08-06 12:04:50 +0200 |
commit | 0fcd05631a1f59e156e613448262800c155e79d0 (patch) | |
tree | beb6c0d0a18b6918b3d84ecaf0566d92a8375cc5 /src | |
parent | 64138b70e10b9812af8f944e83747aa51da9a920 (diff) | |
download | libgit2-0fcd05631a1f59e156e613448262800c155e79d0.tar.gz |
odb: fix use of wrong printf formatters
The `git_odb_stream` members `declared_size` and `received_bytes` are
both of the type `git_off_t`, which we usually defined to be a 64 bit
signed integer. Thus, passing these members to "PRIdZ" formatters is not
correct, as they are not guaranteed to accept big enough numbers.
Instead, use the "PRId64" formatter, which is able to represent 64 bit
signed integers.
Diffstat (limited to 'src')
-rw-r--r-- | src/odb.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1384,8 +1384,8 @@ static int git_odb_stream__invalid_length( { giterr_set(GITERR_ODB, "cannot %s - " - "Invalid length. %"PRIdZ" was expected. The " - "total size of the received chunks amounts to %"PRIdZ".", + "Invalid length. %"PRId64" was expected. The " + "total size of the received chunks amounts to %"PRId64".", action, stream->declared_size, stream->received_bytes); return -1; |