8 Feb 2011 19:44
Re: Problem with attach
Hi,
Well, I've continued my research on this matter and found something
interesting. Long story short: somehow, when ripmime is executed over
this email containing a single word file, it extracts a zero length
file named just "d". Then, when the function str_rstr() compares the
file name with the extensions provided in the simcontrol file (inside
check_attach()), it returns -1 when the last character of the
extension tested matches the only character in this filename. The bad
extension "found" was ".cmd", so this last "d" is equal to the
filename of the supposedly attached file generated by ripmime, so
simscan returns exit code 82 and game over.
The solution should be to fix ripmime, as it's extracting a
non-existent zero length file (adding endless fun to my otherwise
boring week), but as I was trying to get this to work asap (so no more
flaming arrows hit my door), I've wrote a small workaround in
simscan.c so it ignores the file when its name length is shorter than
the extension to check at that time. That way, I rest assured that the
extension will be checked more properly (from my point of view), and
it's faster for me than to debug ripmime... (BTW: I'm using ripmime
1.4.0.9). I know it's not clean and may not be the best way to deal
with the problem, but it worked for me and I really, really need to
sleep well tonight...
My quick 'n dirty "fix":
------------------------------------------------8<-----------------------------------------------------
--- simscan-1.4.0/simscan.c 2011-02-08 16:00:43.579074836 -0200
+++ simscan-1.4.0-fixed/simscan.c 2011-02-08 16:04:24.931075207 -0200
<at> <at> -1735,10 +1735,14 <at> <at>
for(i=0;i<MaxAttach;++i) {
(Continue reading)
RSS Feed