bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] RE: tar 1.19 crashes on -F anything


From: Bengt-Arne Fjellner
Subject: [Bug-tar] RE: tar 1.19 crashes on -F anything
Date: Sun, 28 Oct 2007 22:41:41 +0100

Bengt-Arne Fjellner wrote:
> Not on the list so please cc me.
> 
> MacOSX 10.4.10
> $ gcc --version
> i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build
> 5367) 
> Copyright (C) 2005 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There
> is NO 
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> PURPOSE. 
> 
> 
> 
>  /tmp/tar-1.19/src/tar -cf archive.tar  -F /usr/bin/true -L 1024 
> ../Wcalc-2.3/ 
> 
> /tmp/tar-1.19/src/tar: Removing leading `../' from member names
> tar(19027) malloc: ***  Deallocation of a pointer not malloced:
> 0x4009a0; This could be a double free(), or free() called with the
> middle of an allocated block; Try setting environment variable Mal\
> locHelp to see tools to help debug  
> tar(19027) malloc: ***  Deallocation of a pointer not malloced:
> 0x4006a0; This could be a double free(), or free() called with the
> middle of an allocated block; Try setting environment variable Mal\
> locHelp to see tools to help debug  
> 
> this works fine with tar1.18
> how can I help to nail it down ?

Problem found. 
buf in sys_exec_info_script was not initialized to zero;
see patch:

$ diff -u src/system.c.org src/system.c
--- src/system.c.org    2007-10-28 22:33:20.000000000 +0100
+++ src/system.c        2007-10-28 22:33:31.000000000 +0100
@@ -785,7 +785,7 @@

       int rc;
       int status;
-      char *buf;
+      char *buf=0;
       size_t size = 0;
       FILE *fp;

Seems to work now. Problem is probably there in earlier versions to.
-- 
Bengt-Arne Fjellner




reply via email to

[Prev in Thread] Current Thread [Next in Thread]