Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  Increase the size of the die/warning buffer to avoid truncation
  close_sha1_file(): make it easier to diagnose errors
  avoid possible overflow in delta size filtering computation
  • Loading branch information
gitster committed Mar 25, 2009
2 parents 7c98213 + 389d176 commit 89fbda2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion builtin-pack-objects.c
Expand Up @@ -1293,7 +1293,7 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
max_size = trg_entry->delta_size;
ref_depth = trg->depth;
}
max_size = max_size * (max_depth - src->depth) /
max_size = (uint64_t)max_size * (max_depth - src->depth) /
(max_depth - ref_depth + 1);
if (max_size == 0)
return 0;
Expand Down
2 changes: 1 addition & 1 deletion sha1_file.c
Expand Up @@ -2287,7 +2287,7 @@ static void close_sha1_file(int fd)
fsync_or_die(fd, "sha1 file");
fchmod(fd, 0444);
if (close(fd) != 0)
die("unable to write sha1 file");
die("error when closing sha1 file (%s)", strerror(errno));
}

/* Size of directory component, including the ending '/' */
Expand Down
2 changes: 1 addition & 1 deletion usage.c
Expand Up @@ -7,7 +7,7 @@

static void report(const char *prefix, const char *err, va_list params)
{
char msg[256];
char msg[1024];
vsnprintf(msg, sizeof(msg), err, params);
fprintf(stderr, "%s%s\n", prefix, msg);
}
Expand Down

0 comments on commit 89fbda2

Please sign in to comment.