index 685566e0b5e458c510fdf989744d63dda29e28f0..14e04e6795bd514fb1fec506073d8a9a71668cfa 100644 (file)
--- a/builtin/unpack-objects.c
+++ b/builtin/unpack-objects.c
offset += bytes;
/* make sure off_t is sufficiently large not to wrap */
- if (consumed_bytes > consumed_bytes + bytes)
+ if (signed_add_overflows(consumed_bytes, bytes))
die("pack too large for current definition of off_t");
consumed_bytes += bytes;
}
static void *get_data(unsigned long size)
{
- z_stream stream;
+ git_zstream stream;
void *buf = xmalloc(size);
memset(&stream, 0, sizeof(stream));