Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/gnu/usr.bin/tar Pull up revision 1.4->1.5:



details:   https://anonhg.NetBSD.org/src/rev/d7338335a535
branches:  netbsd-1-4
changeset: 469282:d7338335a535
user:      he <he%NetBSD.org@localhost>
date:      Tue Aug 24 19:57:48 1999 +0000

description:
Pull up revision 1.4->1.5:
  Cast off_t to size_t when passing arguments to functions expecting
  a size_t.  This fixes errors due to memory corruption when
  extracting archives with gtar style long file names on big endian
  machines.  Fixes PR#8229.  (bad)

diffstat:

 gnu/usr.bin/tar/gnu.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (21 lines):

diff -r 3601fe3f604e -r d7338335a535 gnu/usr.bin/tar/gnu.c
--- a/gnu/usr.bin/tar/gnu.c     Tue Aug 24 19:31:20 1999 +0000
+++ b/gnu/usr.bin/tar/gnu.c     Tue Aug 24 19:57:48 1999 +0000
@@ -18,7 +18,7 @@
 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #ifndef lint
-static char rcsid[] = "$Id: gnu.c,v 1.4 1994/03/27 09:27:25 cgd Exp $";
+static char rcsid[] = "$Id: gnu.c,v 1.4.10.1 1999/08/24 19:57:48 he Exp $";
 #endif /* not lint */
 
 #include <stdio.h>
@@ -582,7 +582,7 @@
   add_buffer (the_buffer, "", 1);
 
   current_dir = get_buffer (the_buffer);
-  archive_dir = (char *) ck_malloc (hstat.st_size);
+  archive_dir = (char *) ck_malloc ((size_t)hstat.st_size);
   if (archive_dir == 0)
     {
       msg ("Can't allocate %qd bytes for restore", hstat.st_size);



Home | Main Index | Thread Index | Old Index