File tar-fortifysourcessigabrt.patch of Package tar.import5595

Index: tar-1.25/src/create.c
===================================================================
--- tar-1.25.orig/src/create.c
+++ tar-1.25/src/create.c
@@ -517,8 +517,8 @@ start_private_header (const char *name,
   GID_TO_CHARS (getgid (), header->header.gid);
   MAJOR_TO_CHARS (0, header->header.devmajor);
   MINOR_TO_CHARS (0, header->header.devminor);
-  strncpy (header->header.magic, TMAGIC, TMAGLEN);
-  strncpy (header->header.version, TVERSION, TVERSLEN);
+  memcpy (header->header.magic, TMAGIC, TMAGLEN);
+  memcpy (header->header.version, TVERSION, TVERSLEN);
   return header;
 }
 
@@ -906,8 +906,8 @@ start_header (struct tar_stat_info *st)
 
     case POSIX_FORMAT:
     case USTAR_FORMAT:
-      strncpy (header->header.magic, TMAGIC, TMAGLEN);
-      strncpy (header->header.version, TVERSION, TVERSLEN);
+      memcpy (header->header.magic, TMAGIC, TMAGLEN);
+      memcpy (header->header.version, TVERSION, TVERSLEN);
       break;
 
     default:
openSUSE Build Service is sponsored by