~ubuntu-branches/ubuntu/gutsy/php5/gutsy

« back to all changes in this revision

Viewing changes to ext/zip/lib/zip_stat_init.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt, CVE-2007-0905, CVE-2007-0906, CVE-2007-0909, CVE-2007-0910
  • Date: 2007-02-20 17:54:46 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20070220175446-nudqyuv0dfowel3r
Tags: 5.2.1-0ubuntu1
* New upstream security/bugfix release:
  - safe_mode & open_basedir bypasses inside the session extension
    [CVE-2007-0905]
  - multiple buffer overflows in various extensions and functions
    [CVE-2007-0906]
  - underflow in the internal sapi_header_op() function [CVE-2007-0907]
  - information disclosure in the wddx extension [CVE-2007-0908]
  - string format vulnerability in *print() functions on 64 bit systems
    [CVE-2007-0909]
  - possible clobbering of super-globals in several code paths
    [CVE-2007-0910]
* Adapted patches to new upstream release:
  - 006-debian_quirks.patch
  - 034-apache2_umask_fix.patch
  - 044-strtod_arm_fix.patch
* Drop 109-libdb4.4.patch: Obsolete, upstream now checks for db 4.5 and 4.4.
* Drop 114-zend_alloc.c_m68k_alignment.patch and
  115-zend_alloc.c_memleak.patch: Applied upstream.
* Add debian/patches/000upstream-str_ireplace_offbyone.patch:
  - Fix off-by-one in str_ireplace(), a regression introduced in 5.2.1.
  - Patch taken from upstream CVS:
    http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.630&r2=1.631
  - CVE-2007-0911
* debian/control: Set Ubuntu maintainer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  $NiH: zip_stat_init.c,v 1.1 2006/10/31 12:03:04 dillo Exp $
 
3
 
 
4
  zip_stat_init.c -- initialize struct zip_stat.
 
5
  Copyright (C) 2006 Dieter Baron and Thomas Klausner
 
6
 
 
7
  This file is part of libzip, a library to manipulate ZIP archives.
 
8
  The authors can be contacted at <nih@giga.or.at>
 
9
 
 
10
  Redistribution and use in source and binary forms, with or without
 
11
  modification, are permitted provided that the following conditions
 
12
  are met:
 
13
  1. Redistributions of source code must retain the above copyright
 
14
     notice, this list of conditions and the following disclaimer.
 
15
  2. Redistributions in binary form must reproduce the above copyright
 
16
     notice, this list of conditions and the following disclaimer in
 
17
     the documentation and/or other materials provided with the
 
18
     distribution.
 
19
  3. The names of the authors may not be used to endorse or promote
 
20
     products derived from this software without specific prior
 
21
     written permission.
 
22
 
 
23
  THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
 
24
  OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 
25
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 
26
  ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
 
27
  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
28
  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
 
29
  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 
30
  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
 
31
  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 
32
  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 
33
  IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
34
*/
 
35
 
 
36
 
 
37
 
 
38
#include "zipint.h"
 
39
 
 
40
 
 
41
 
 
42
void
 
43
zip_stat_init(struct zip_stat *st)
 
44
{
 
45
    st->name = NULL;
 
46
    st->index = -1;
 
47
    st->crc = 0;
 
48
    st->mtime = (time_t)-1;
 
49
    st->size = -1;
 
50
    st->comp_size = -1;
 
51
    st->comp_method = ZIP_CM_STORE;
 
52
    st->encryption_method = ZIP_EM_NONE;
 
53
}