Print the proper file name in case we fail to allocate a "path" extended header
authorjca <jca@openbsd.org>
Thu, 21 Dec 2023 01:20:54 +0000 (01:20 +0000)
committerjca <jca@openbsd.org>
Thu, 21 Dec 2023 01:20:54 +0000 (01:20 +0000)
Use name, not ln_name.  Pasto introduced in previous.

bin/pax/tar.c

index 91bc114..84078ea 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: tar.c,v 1.74 2023/12/09 23:00:11 jca Exp $    */
+/*     $OpenBSD: tar.c,v 1.75 2023/12/21 01:20:54 jca Exp $    */
 /*     $NetBSD: tar.c,v 1.5 1995/03/21 09:07:49 cgd Exp $      */
 
 /*-
@@ -1072,7 +1072,7 @@ wr_ustar_or_pax(ARCHD *arcn, int ustar)
 #ifndef SMALL
                else if (xheader_add(&xhdr, "path", arcn->name) == -1) {
                        paxwarn(1, "File name too long for pax %s",
-                           arcn->ln_name);
+                           arcn->name);
                        xheader_free(&xhdr);
                        return(1);
                }