[hackers] [sbase] tar: Fix a few weprintf/eprintf format strings || Michael Forney

From: <git_AT_suckless.org>
Date: Sun, 10 Sep 2017 02:45:26 +0200 (CEST)

commit e6d3032131760725ab409a9c3c78fa81fff3d1e2
Author: Michael Forney <mforney_AT_mforney.org>
AuthorDate: Sat Sep 9 17:34:43 2017 -0700
Commit: Michael Forney <mforney_AT_mforney.org>
CommitDate: Sat Sep 9 17:34:43 2017 -0700

    tar: Fix a few weprintf/eprintf format strings
    
    Thanks to Jim Beveridge for spotting the incorrect utimensat error.
    
    Turns out there are a few other instances of this in the vicinity.

diff --git a/tar.c b/tar.c
index 53a737c..a6ead2e 100644
--- a/tar.c
+++ b/tar.c
_AT_@ -331,15 +331,15 @@ unarchive(char *fname, ssize_t l, char b[BLKSIZ])
         times[0].tv_sec = times[1].tv_sec = mtime;
         times[0].tv_nsec = times[1].tv_nsec = 0;
         if (!mflag && utimensat(AT_FDCWD, fname, times, AT_SYMLINK_NOFOLLOW) < 0)
- weprintf("utimensat %s:\n", fname);
+ weprintf("utimensat %s:", fname);
         if (h->type == SYMLINK) {
                 if (!getuid() && lchown(fname, uid, gid))
- weprintf("lchown %s:\n", fname);
+ weprintf("lchown %s:", fname);
         } else {
                 if (!getuid() && chown(fname, uid, gid))
- weprintf("chown %s:\n", fname);
+ weprintf("chown %s:", fname);
                 if (chmod(fname, mode) < 0)
- eprintf("fchmod %s:\n", fname);
+ eprintf("fchmod %s:", fname);
         }
 
         return 0;
Received on Sun Sep 10 2017 - 02:45:26 CEST

This archive was generated by hypermail 2.3.0 : Sun Sep 10 2017 - 02:48:20 CEST