Mads Posted January 16, 2009 Report Share Posted January 16, 2009 I am using the Open G POP functions to fetch and decode e-mails with attached zip files, and have run into a rather "fun" combination of errors: 1. If the (zip) file has two zero-bytes at the end it will be reflected in the base64-encoded data, however only one of them will come through when the OpenG base64 decoding is applied. 2. If a zip file lacks that final zero-byte the OpenG unzip-functions (i.e. the dll they use) will crash. So - in my case my code receives and writes a zip file, and that zip file is read and decompressed just fine with other zip-software, however because the same software is trying to use the OpenG unzip function it ends up crashing the whole software.... I can probably figure out a way to edit the decoder so that it does not lose any bytes (perhaps this is a known issue that is routinely solved?), however it is still a bit uncomfortable to know that the unzip function is possible to crash by feeding it a file with such an error. Mads Quote Link to comment
Mark Smith Posted January 16, 2009 Report Share Posted January 16, 2009 I can't help you with the zip file issue, but if you want to try a different base64 encoder/decoder and see how that works, you can get the ones that are part of the XML-RPC Server for LabVIEW in the Code Repository (http://forums.lavag.org/XML-RPC-Server-for-LabVIEW-file156.html). The XML-RPC standard must support base64 encoding/decoding so I wrote these implementations for that toolkit. Mark Quote Link to comment
Mads Posted January 16, 2009 Author Report Share Posted January 16, 2009 Superb, your base64 code did the trick, thanks As for the weakness in the unzip-function I tried downloading the latest version (mine was the previous version) and to my luck the issue seems to have been adressed there, so now absolutely everything works as it should :thumbup: :thumbup: PS. The OpenG base64 decoder still has this problem, that code is not maintained anymore (I think(?))...so replacing it, e.g. with Mark's code, might be useful for others as well. Mads QUOTE (mesmith @ Jan 15 2009, 02:54 PM) I can't help you with the zip file issue, but if you want to try a different base64 encoder/decoder and see how that works, you can get the ones that are part of the XML-RPC Server for LabVIEW in the Code Repository (http://forums.lavag.org/XML-RPC-Server-for-LabVIEW-file156.html). The XML-RPC standard must support base64 encoding/decoding so I wrote these implementations for that toolkit.Mark Quote Link to comment
LAVA 1.0 Content Posted January 16, 2009 Report Share Posted January 16, 2009 To be clear, the actual bug is inside the base64 code VI in the email toolkit. I assume you downloaded the code from Sourceforge? (could you provide a URL?) Thanks, Ton (if you are interested in improving this toolkit please join OpenG) Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.