bug? using unrar

Rick Cooper rcooper at DWFORD.COM
Wed Mar 9 13:06:31 GMT 2005


    [ The following text is in the "ISO-8859-2" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

> -----Original Message-----
> From: MailScanner mailing list
> [mailto:MAILSCANNER at JISCMAIL.AC.UK]On Behalf Of Marcin Ro¿ek
> Sent: Wednesday, March 09, 2005 4:07 AM
> To: MAILSCANNER at JISCMAIL.AC.UK
> Subject: Re: bug? using unrar
>
>
> Rick Cooper wrote:
>
> > Ok that makes sense as a standard exe would return a null string to the
> > unrar lb and UnPackRar would exit right then and there. But there is
> > obviously an issue with the name being duplicated, that should
> not happen..
> > unless. Oops! That version doesn't have the revised handling of
> being unable
> > to rename safe names. I think Julian has something coming that
> would prevent
> > that from happening as well. I would still like to test that archive.
> Yes. The problem is that DBF.EXE is self-extracring rar archive
> which includes
> few files with the same names as other files in .zip archive. It
> is easy to
> reproduce. Make 3 text files and name them eg file1, file2,
> file3. Make .rar
> archive eg archive.rar and pack file2 and file3. Then, make .zip
> archive that
> includes file1, file2, file3 and archive.rar. When you send that
> .zip archive

The problem is that before each file is extracted the file name
*shouldbe/is* checked to make sure a file of that name does not already
exist (among other things) in the working directory. If it does it's
modified prior to extraction. so file.exe would become something like
01file.exe. However if there is a problem with the archive and the file
could not be renamed then the file should be skipped rather than blindly
extracted (which should be the behavior in the next releasenow) and I was
curious as to why the file could not be renamed. The function has already
been tested with dups, in fact I had a test file that contained two archives
each containing three directories with the same file in them, which appears
to MS as all duplicates


> through MailScanner the problem will occure.
>
>  > In the help for my version of unrar it is -y and not -Y.
>  > Can you confirm please?
> If it is safe to overwrite already unpacked files (are they
> already scanned?)
> then -y can be a solution.
>

They have not been scanned so this isn't ideal, but neither is having MS
looping on that file name. The parent archive will be scanned as a whole
however. While working on this function Julian had mentioned it would take a
particularly oddly broken file to hit that section so it would be hard to
test. If you can get him a copy of the exact file that would be a help as to
trying to determine what went wrong with the rename in the first place. I
believe in debug mode you should see a message saying it is renaming a file
in the archive from filenameone to filenametwo if it's possible to still
test that message in debug mode

Rick


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list