Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bounties #608

Merged
merged 3 commits into from
Feb 18, 2024
Merged

Bounties #608

merged 3 commits into from
Feb 18, 2024

Commits on Jan 16, 2024

  1. tree: move assignments of ->tree_errno up a bit

    Both tree_ascend() and tree_pop() may cause errno to be
    set/clobbered. As for the latter, we're certainly not interested in
    the random values that free() etc. may leave in errno.
    
    If tree_ascend() fails, its return value takes precedence in
    determining t->visit_type and the return value, but tree_ascend() also
    updates t->tree_errno appropriately, which makes sense.
    
    But when tree_ascend() succeeds, t->tree_errno should reflect the
    reason for opendir() failing, which requires that we record errno
    immediately.
    
    Bug bounty:	$20
    Villemoes authored and gperciva committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    c962254 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2024

  1. tar/tree.h: fix comment and clobbered errno

    The relevant change in tar/tree.c was made in:
        2011-08-25 Tarsnap 1.0.30
        c80c7d2
    
    Reported by:	Rasmus Villemoes
    Bug bounty:	$11
    gperciva committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    f4c090e View commit details
    Browse the repository at this point in the history
  2. write.c: fix clobbered errno

    This should have been part of:
        2008-12-10 Tarsnap 1.0.17
        b8dcf6c
    
    There's lots of code between `tree_ret = tree_next()` and this part,
    so we can't trust errno.
    
    Reported by:	Rasmus Villemoes
    Bug bounty:	$10
    gperciva committed Jan 17, 2024
    Configuration menu
    Copy the full SHA
    6dd740e View commit details
    Browse the repository at this point in the history