Extract TNEF portions even when the filename can't be determined

git-svn: trunk@1554
remotes/push_mirror/metadata
Nigel Horne 20 years ago
parent d9b55a82a2
commit 21992fd126
  1. 6
      clamav-devel/ChangeLog
  2. 8
      clamav-devel/libclamav/blob.c
  3. 7
      clamav-devel/libclamav/tnef.c

@ -1,3 +1,9 @@
Wed May 18 21:31:34 BST 2005 (njh)
----------------------------------
* libclamav: Extract TNEF files even when the filename isn't known - problem
reported by John Miller (contact at
glideslopesoftware.co.uk)
Mon May 16 23:02:13 CEST 2005 (tk)
----------------------------------
* freshclam/manager.c: remove superfluous close(hostfd), thanks to Pavel V.

@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
static char const rcsid[] = "$Id: blob.c,v 1.41 2005/04/23 10:33:44 nigelhorne Exp $";
static char const rcsid[] = "$Id: blob.c,v 1.42 2005/05/18 20:29:45 nigelhorne Exp $";
#if HAVE_CONFIG_H
#include "clamav-config.h"
@ -361,10 +361,12 @@ fileblobDestroy(fileblob *fb)
assert(fb->b.data == NULL);
} else if(fb->b.data) {
cli_errmsg("fileblobDestroy: file not saved: report to bugs@clamav.net\n");
free(fb->b.data);
if(fb->b.name)
if(fb->b.name) {
cli_errmsg("fileblobDestroy: %s not saved: report to bugs@clamav.net\n", fb->b.name);
free(fb->b.name);
} else
cli_errmsg("fileblobDestroy: file not saved (%lu bytes): report to bugs@clamav.net\n", fb->b.len);
}
#ifdef CL_DEBUG
fb->b.magic = INVALIDCLASS;

@ -24,7 +24,7 @@
#include "clamav-config.h"
#endif
static char const rcsid[] = "$Id: tnef.c,v 1.22 2005/05/12 12:39:57 nigelhorne Exp $";
static char const rcsid[] = "$Id: tnef.c,v 1.23 2005/05/18 20:29:44 nigelhorne Exp $";
#include <stdio.h>
#include <fcntl.h>
@ -184,6 +184,11 @@ cli_tnef(const char *dir, int desc)
} while(!alldone);
if(fb) {
cli_dbgmsg("cli_tnef: flushing final data\n");
if(fileblobGetFilename(fb) == NULL) {
cli_dbgmsg("Saving TNEF portion with an unknown name");
fileblobSetFilename(fb, dir, "unknownTNEFfile");
}
fileblobDestroy(fb);
fb = NULL;
}

Loading…
Cancel
Save