+Sun Jan 31 18:29:18 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
+ * Added qpdecode.c to the distribution (decodes quoted-printable)
+ * Finished the MIME parser
+ * Gave MSG0 a reasonable behaviour for MIME messages
+
Sat Jan 30 18:39:53 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
* Look for citadel.rc in current directory if not found elsewhere
* More work on the MIME parser
* Allocate a buffer for the decoded data. The output buffer is the
* same size as the input buffer; this assumes that the decoded data
* will never be larger than the encoded data. This is a safe
- * assumption with base64, uuencode, and quoted-printable.
+ * assumption with base64, uuencode, and quoted-printable. Just to
+ * be safe, we still pad the buffer a bit.
*/
- decoded = mallok(length);
+ decoded = mallok(length + 1024);
if (decoded == NULL) {
lprintf(5, "ERROR: cannot allocate memory.\n");
return;
}
if (childpid == 0) {
- /* close(2); FIX uncomment this when solid */
+ close(2);
/* send stdio to the pipes */
if (dup2(sendpipe[0], 0)<0) lprintf(5, "ERROR dup2()\n");
if (dup2(recvpipe[1], 1)<0) lprintf(5, "ERROR dup2()\n");
if (bytes_recv > 0)
CallBack(name, filename, partnum, disposition, decoded,
content_type, bytes_recv);
+
phree(decoded);
}