opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

0032-pax-Use-memcpy-to-set-TMAGIC-and-TVERSION-to-avoid-w.patch (741B)


      1 From e5c8e801a42459bf0c416f6751b687d61f46fcf1 Mon Sep 17 00:00:00 2001
      2 From: Michael Forney <mforney@mforney.org>
      3 Date: Thu, 4 Jun 2020 21:44:26 -0700
      4 Subject: [PATCH] pax: Use memcpy to set TMAGIC and TVERSION to avoid warning
      5 
      6 ---
      7  bin/pax/tar.c | 4 ++--
      8  1 file changed, 2 insertions(+), 2 deletions(-)
      9 
     10 diff --git a/bin/pax/tar.c b/bin/pax/tar.c
     11 index 8d6b3f37012..1f4012123c3 100644
     12 --- a/bin/pax/tar.c
     13 +++ b/bin/pax/tar.c
     14 @@ -1040,8 +1040,8 @@ ustar_wr(ARCHD *arcn)
     15  		break;
     16  	}
     17  
     18 -	strncpy(hd->magic, TMAGIC, TMAGLEN);
     19 -	strncpy(hd->version, TVERSION, TVERSLEN);
     20 +	memcpy(hd->magic, TMAGIC, TMAGLEN);
     21 +	memcpy(hd->version, TVERSION, TVERSLEN);
     22  
     23  	/*
     24  	 * set the remaining fields. Some versions want all 16 bits of mode
     25 -- 
     26 2.35.1
     27