mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-03 20:02:04 +00:00
![]() The overflow check in `read_reuc` tries to verify if the `git__strtol32` parses an integer bigger than UINT_MAX. The `tmp` variable is casted to an unsigned int for this and then checked for being greater than UINT_MAX, which obviously can never be true. Fix this by instead fixing the `mode` field's size in `struct git_index_reuc_entry` to `uint32_t`. We can now parse the int with `git__strtol64`, which can never return a value bigger than `UINT32_MAX`, and additionally checking if the returned value is smaller than zero. We do not need to handle overflows explicitly here, as `git__strtol64` returns an error when the returned value would overflow. |
||
---|---|---|
.. | ||
commit.h | ||
config.h | ||
diff.h | ||
filter.h | ||
hashsig.h | ||
index.h | ||
mempack.h | ||
odb_backend.h | ||
openssl.h | ||
refdb_backend.h | ||
reflog.h | ||
refs.h | ||
repository.h | ||
stream.h | ||
transport.h |