LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-22-2014, 06:45 AM   #1
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,446

Rep: Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509
Problems with zipnote writing to files


Can anyone here get recent versions of zipnote to work?

The following allows me to write out the comments and file names included in a zip file for editing

Code:
$ zipnote test.zip > testcomments.tmp
However, when I try to apply my edits back zipnote crashes. In fact it crashes even if I make no changes, e.g.

Code:
$ zipnote test.zip > testcomments.tmp
$ zipnote -w test.zip < testcomments.tmp 
zipnote error: Bad file descriptor
*** glibc detected *** zipnote: free(): corrupted unsorted chunks: 0x09ff0530 ***
*** glibc detected *** zipnote: malloc(): memory corruption: 0xb77d5008 ***
Inconsistency detected by ld.so: dl-open.c: 221: dl_open_worker: Assertion `_dl_debug_initialize (0, args->nsid)->r_state == RT_CONSISTENT'
I have tested this with ZipNote 3.0 on 32-Bit Slackware 14.0 and MacOSX 10.8.5.
 
Old 04-23-2014, 03:49 AM   #2
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,446

Original Poster
Rep: Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509
I subsequently reported this upstream and received a reply from Steven M. Schweda of the Info-ZIP development team. He confirmed that this was a known issue and was fixed in the Zip 3.1b beta release already. In the mean time he pointed out that I could patch zipnote.c to make this work in Zip 3.0.

Code:
--- ./zipnote.c.orig    2014-04-23 10:26:14.000000000 +0200
+++ ./zipnote.c 2014-04-23 10:27:27.000000000 +0200
@@ -661,7 +661,7 @@
     if ((r = zipcopy(z)) != ZE_OK)
       ziperr(r, "was copying an entry");
   }
-  fclose(x);
+  fclose(in_file);
 
   /* Write central directory and end of central directory with new comments */
   if ((c = zftello(y)) == (zoff_t)-1)    /* get start of central */
In the Slackware forum I shall request that they would consider patching this in -current.
 
Old 04-23-2014, 04:02 AM   #3
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,446

Original Poster
Rep: Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509
Quote:
Originally Posted by ruario View Post
In the Slackware forum I shall request that they would consider patching this in -current.
Requested!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What process is writing to what files? czamora Linux - Server 4 11-22-2013 09:11 AM
Cron/writing files leavage Linux - Newbie 3 08-17-2011 02:16 PM
fork() and writing to files maenho Programming 3 12-23-2007 07:23 PM
writing to files in C ocularbob Programming 9 02-17-2004 12:06 PM
Writing Single files to a CD jimmmac Linux - Software 11 04-27-2003 04:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration