~ubuntu-branches/ubuntu/maverick/clamav/maverick-backports

« back to all changes in this revision

Viewing changes to libclamav/untar.c

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Gran, Stephen Gran, Michael Tautschnig
  • Date: 2010-04-26 21:41:18 UTC
  • mfrom: (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100426214118-i6lo606wnh7ywfj6
Tags: 0.96+dfsg-4
[ Stephen Gran ]
* Fixed typo in clamav-milter's postinst

[ Michael Tautschnig ]
* Fixed typo in clamav-freshclam's postinst (closes: #579271)
* Debconf translation updates
  - Portuguese (closes: #579068)

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
#include "mbox.h"
43
43
#include "blob.h"
44
44
#include "scanners.h"
 
45
#include "matcher.h"
45
46
 
46
47
#define BLOCKSIZE 512
47
48
 
48
 
#ifndef O_BINARY
49
 
#define O_BINARY        0
50
 
#endif
51
 
 
52
49
static int
53
50
octal(const char *str)
54
51
{
184
181
 
185
182
                        strncpy(name, block, 100);
186
183
                        name[100] = '\0';
187
 
                        snprintf(fullname, sizeof(fullname)-1, "%s/tar%02u", dir, files);
 
184
                        if(cli_matchmeta(ctx, name, size, size, 0, files, 0, NULL) == CL_VIRUS)
 
185
                            return CL_VIRUS;
 
186
 
 
187
                        snprintf(fullname, sizeof(fullname)-1, "%s"PATHSEP"tar%02u", dir, files);
188
188
                        fullname[sizeof(fullname)-1] = '\0';
189
189
                        fout = open(fullname, O_RDWR|O_CREAT|O_EXCL|O_TRUNC|O_BINARY, 0600);
190
190