Skip to content

Commit

Permalink
Merge pull request #586 from Tarsnap/bounties
Browse files Browse the repository at this point in the history
Nitpicks
  • Loading branch information
cperciva authored Sep 26, 2023
2 parents 262b178 + d5c1efc commit 9bea927
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib-platform/util/ts_getfstype.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static struct ftyperec {
{SELINUX_MAGIC, "selinux"},
{0, NULL}
};
#endif /* HAVE_STATFS_F_TYPE */
#endif /* HAVE_STRUCT_STATFS_F_TYPE */
#endif /* !HAVE_STRUCT_STATVFS_F_FSTYPENAME */
#endif /* !HAVE_STRUCT_STATVFS_F_BASETYPE */
#endif /* !HAVE_STRUCT_STATFS_F_FSTYPENAME */
Expand Down
8 changes: 6 additions & 2 deletions tar/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ process_lines(struct bsdtar *bsdtar, const char *pathname,
FILE *f;
char *buff, *buff_end, *line_start, *line_end, *p;
size_t buff_length, new_buff_length, bytes_read, bytes_wanted;
size_t buff_end_pos;
size_t line_end_pos;
const char * separator;
size_t seplen;
int lastcharwasr = 0;
Expand Down Expand Up @@ -376,12 +378,14 @@ process_lines(struct bsdtar *bsdtar, const char *pathname,
bsdtar_errc(bsdtar, 1, ENOMEM,
"Line too long in %s", pathname);
buff_length = new_buff_length;
buff_end_pos = buff_end - buff;
line_end_pos = line_end - buff;
p = realloc(buff, buff_length);
if (p == NULL)
bsdtar_errc(bsdtar, 1, ENOMEM,
"Line too long in %s", pathname);
buff_end = p + (buff_end - buff);
line_end = p + (line_end - buff);
buff_end = p + buff_end_pos;
line_end = p + line_end_pos;
line_start = buff = p;
bsdtar->conffile_buffer = buff;
}
Expand Down

0 comments on commit 9bea927

Please sign in to comment.