diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/odb_loose.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/odb_loose.c b/src/odb_loose.c index 2294931b4..9900aae2a 100644 --- a/src/odb_loose.c +++ b/src/odb_loose.c @@ -156,6 +156,11 @@ static int parse_header( size < 0) goto on_error; + if ((uint64_t)size > SIZE_MAX) { + giterr_set(GITERR_OBJECT, "object is larger than available memory"); + return -1; + } + out->size = size; if (GIT_ADD_SIZET_OVERFLOW(out_len, i, 1)) |
