Menu

#74 Segmentation fault when renaming or deleting files in tar.xz or tar.bz2 archives

v1.0 (example)
open
nobody
None
5
2014-05-21
2014-05-20
No

Version: 0.5.3

The attached patch fixes a regression and a segmentation fault that occurred when files in tar.xz or tar.bz2 archives were renamed or deleted.

1 Attachments

Discussion

  • Giuseppe Torelli

    Hi,

    deleting works. But when try to rename the file libtool I get an error. Please see attached screenshot.

     
    • Markus Koschany

      Markus Koschany - 2014-05-20

      On 20.05.2014 22:31, Giuseppe Torelli wrote:

      Hi,

      deleting works. But when try to rename the file libtool I get an error.
      Please see attached screenshot.

      Hi,

      that's strange because renaming of files in tar.bz2 archives works just
      fine now. 0.5.3 is available in Debian, can you reproduce the same issue
      with this version?

       
  • Giuseppe Torelli

    Just drop a folder into Xarchiver and create a .tar.bz2.
    Then try to rename a file by adding a space in the middle of the filename.

    You should get the error as in the attachment.

     
  • Teo Box

    Teo Box - 2014-05-21

    Hi all,

    I fix the same bug when i work on the 0.5.4 patch

    by changing this line (main.c:334)

    delete[XARCHIVETYPE_BZIP2]  = delete[XARCHIVETYPE_GZIP] = delete[XARCHIVETYPE_LZMA] = delete[XARCHIVETYPE_XZ] = delete[XARCHIVETYPE_LZOP] = &xa_tar_delete;
    

    which solution is the best ?

    regards

    TB

     
    • Markus Koschany

      Markus Koschany - 2014-05-21

      On 21.05.2014 10:34, Teo Box wrote:

      Hi all,

      I fix the same bug when i work on the 0.5.4 patch

      by changing this line (main.c:334)

      delete[XARCHIVETYPE_BZIP2] = delete[XARCHIVETYPE_GZIP] = delete[XARCHIVETYPE_LZMA] = delete[XARCHIVETYPE_XZ] = delete[XARCHIVETYPE_LZOP] = &xa_tar_delete;

      which solution is the best ?

      I still can't reproduce the bug. If I add a folder to xarchiver and a
      tar.bz2 archive and rename it everything seems to work as expected.

      That's what I find in main.c:

      delete[XARCHIVETYPE_BZIP2] = 0;

      delete[XARCHIVETYPE_TAR] = delete[XARCHIVETYPE_TAR_BZ2] =
      delete[XARCHIVETYPE_TAR_GZ] = delete[XARCHIVETYPE_TAR_LZMA] =
      delete[XARCHIVETYPE_TAR_LZOP] = &xa_tar_delete;

       

Log in to post a comment.