.
D 2024-10-11T06:37:49.574
J assignee nobody
J closer nobody
J cmimetype text/x-fossil-plain
J comment It's\slong\sestablished\sin\sthe\swindows\sworld\sat\sleast\sthat\sexecutables\scan\sbe\sjoined\sto\sthe\sbeginning\sof\sa\szipfile\sby\ssimple\scatenation.\r\n\r\n\s\scat\ssome.exe\ssome.zip\s>\sexewithzip.exe\r\n\r\nVarious\sprograms\suse\sthis..\se.g\sjust\sa\srandom\sexample:\shttps://jasonliang.js.org/fusing.html\r\n\sbut\sit\sshows\san\sequivalent\smethod:\s\r\n\s\scopy\s/b\sinput.exe+input.zip\sexewithzip.exe\r\n\r\nThese\sexewithzip.exe\sfiles\scan\sbe\seasily\supdated\seither\son\scommandline\sor\sthrough\sthe\sgraphical\sinterface\swith\scommon\stools\ssuch\sas\s7-zip\sand\sPeaZip.\r\n\r\nOn\sthe\sother\shand\sfiles\swith\sexecutables\sthat\shave\sbeen\smade\sby\sthe\scurrent\simplementation\sof\szipfs\smkimg\s-\sor\sinfo-zip's\s'zip\s-A'\soption\scannot\sbe\supdated\seither\sgraphically\sor\son\sthe\scommandline\swith\ssuch\stools.\r\n\r\nWorse\s-\sinfo-zips\s'zip\s-A\scattedzip.exe'\srefused\sto\sadjust\sthe\soffsets\sanyway\swhen\sI\stried\sit\son\swindows\sand\ssuggests\strying\s-FF\s-\swhich\sis\sa\sterrible\sidea\sbecause\sit\sjust\sproduces\sa\szip\swith\sthe\sexe\spart\sstripped\soff.\r\n\r\nAs\svenerable\sand\swidespread\sas\sinfo-zip\sis\s-\sthere\sare\smultiple\sversions\swith\sslightly\sdifferent\sbehaviour\sand\sthe\sproject\sseems\sto\sbe\sslow\sto\srelease\s(glass\shouses..\sbut\sanyway)\r\n\r\nAs\spoorly\sspecified\sas\sthe\szip\sformat\sis\s-\sI\sdon't\ssee\sany\sjustification\sfor\sinfo-zips\schoice\sto\streat\soffset\sfrom\sthe\sbeginning\sof\sthe\sfile\sas\spreferential\svs\soffsets\sfrom\swhere\sthe\szip\sarchive\sstarts\sin\sthe\sfile.\r\nThe\spkware\sappnotes\sjust\ssay:\r\n"Offset\sof\sthe\sstart\sof\sthe\scentral\sdirectory\son\sthe\r\n\s\s\s\s\s\sdisk\son\swhich\sthe\scentral\sdirectory\sstarts."\r\n\r\nWhich\sis\sa\sreference\sto\sthe\sold\spractice\sof\ssplitting\szips\sacross\sfloppies\s-\sbut\ssays\snothing\sabout\sadjusting\soffsets\sfor\sprefix\sdata.\r\n\r\nI\sthink\sinfo-zips\schoice\sand\slack\sof\sinteroperability\sflies\sin\sthe\sface\sof\scommon\spractice.\s(one\sI\sbelieve\srecognized\sby\spkware\sbut\snot\sreally\sclarified)\r\n\r\nTools\slike\s7z\sare\saware\sof\sexezips\swith\sprefixed\sdata\sand\sreport\sit\sin\san\sunalarming\sway\sas:\r\nOffset\s=\sxxxx\r\n\r\nor..\sfor\san\s'adjusted'\sfile\sproduced\sby\szipfs\smkzip\sor\szip\s-A\r\nEmbedded\sStub\sSize\s=\sxxxx\r\n\r\nIt\scan\sbe\sargued\sthat\stheir\schoice\sto\scowardly\srefuse\sto\supdate\sa\sfile\swith\sun-headered\sdata\s*within*\sthe\srange\spointed\sto\sby\sthe\soffset\sis\sjust\sa\sdifferent\sand\sopposite\schoice\sto\sinfo-zip's\s-\sbut\sI'd\sargue\sthat\sinfo-zip's\schoice\sis\smore\scowardly\sin\sthat\sthe\sdata\sis\sclearly\sseparate\sand\sa\s*common*\scase\s-\sand\s7z,peazip\sis\sjust\sconservative\sabout\snot\sbreaking\ssomething\sthat\sisn't\swell\sunderstood.\s\r\n\r\nzip\sfiles\sare\sscanned\sby\slooking\sfor\sthe\send\sof\scentral\sdirectory\srecord\sfrom\sthe\sback\s-\sand\sthe\soffsets\scan\sbe\sprocessed\sfrom\sthere.\sNo\srequirement\sthat\sthe\soffset\smust\sbe\srelative\sto\sthe\sstart\sof\sthe\sfile\sis\sestablished\sand\sI\sdon't\sthink\swe\sshould\sreinforce\sinfo-zip's\stake\son\sit.\r\n\r\n\r\ninfo-zip's\sunzip\sutility\schooses\snot\sto\sdisplay\sthe\sEmbedded\sStub\ssize\son\ssuch\sa\sfile\s-\streating\sthat\sas\ssomehow\s'normal'\s(it's\snot\sdisallowed\s-\sbut\sthere's\sno\sjustification\sfor\streating\sit\sas\sthe\spreferred\sway)\r\n\r\n..\sbut\sit\schooses\sto\sdisplay\san\soffset\srelative\sto\sthe\sstart\sof\sthe\szip-portion\sin\san\s'alarming'\smanner:\r\nwarning\s[catted_only.exe]:\s\sxxxx\sextra\sbytes\sat\sbeginning\sor\swithin\szipfile\r\n(attempting\sto\sprocess\sanyway)\r\n\r\n\r\nMy\scase\sis\sthat\swe\sshouldn't\slet\sinfo-zip's\schoices\sdrive\sthe\sdecision\s-\sand\sthat\spreserving\sinteroperability\sof\splain\scatted\sprefix\s(whether\sit\sbe\sa\stcl\sscript\s+\sctrl-z\s+\szip\sor\sexe\s+\szip)\sis\smore\simportant.\r\n\r\n7z\sis\savailable\son\swindows,BSDs,linux\sand\sI\sbelieve\salso\sMacs.\r\n\r\nunzipping\scatted\sexezips\sdoesn't\sseem\sto\sbe\sa\sproblem\swith\sthe\stools\sI\stested\seither\s'adjusted'\sor\snot.\r\n\r\nMy\spatch\sattached\sto\sticket:\shttps://core.tcl-lang.org/tcl/tktview/ad7bafd5e1\s(though\snot\sreally\sthe\sright\splace\sfor\sthe\score\stopic\sof\sthat\sticket)\s\sworks\sfor\sme\son\swindows\sbut\sI\swould\slike\sto\shear\sarguments\sabout\swhy\sthe\soffset\sadjustments\sare\sbeing\smade.\r\n\r\nticket:\shttps://core.tcl-lang.org/tcl/tktview/fc65ff1b663fd16e7582\s\sis\swhere\sthe\sadjustments\swere\schanged\sfrom\sbeing\srelative\sto\sthe\szip-archive\sstart\sto\srelative\sto\sthe\sfile\sstart.\r\nThe\sway\swe\sused\sto\shave\sthem\s(relative\sto\sarchive\sstart)\sis\sI\sthink\sthe\sbetter\sway.\r\nThe\sissue\sin\sthat\sticket\swas\sabout\s'zipfs\smkimg'\sfailing\sto\soutput\sthe\sexecutable\spart\sat\sall\sunder\slinux\sstatic\sbuilds\s-\sbut\swhatever\scaused\sthat\sshould\sbe\sindependent\sof\show\sthe\soffsets\sare\swritten.
J is_private 0
J login juliannoble2
J priority 5\sMedium
J private_contact 957fdfcd8744611e3fe1f4896c7538b1d9bf47b2
J resolution None
J severity Severe
J status Open
J submitter juliannoble2
J subsystem -\sNew\sBuiltin\sCommands
J title zipfs\soffsets\sare\sa\sproblem
J type Bug
K 26547532af7fb7d24b2cd101b85abdb1a1af6291
U juliannoble2
Z 315efc7ad79dc3780ae64ef79b332d12