~ubuntu-branches/ubuntu/gutsy/vnc4/gutsy

« back to all changes in this revision

Viewing changes to unix/xc/lib/zlib/inftrees.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2006-05-15 20:35:17 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060515203517-l4lre1ku942mn26k
Tags: 4.1.1+X4.3.0-10
* Correction of critical security issue. Thanks to Martin Kogler
  <e9925248@student.tuwien.ac.at> that informed me about the issue,
  and provided the patch.
  This flaw was originally found by Steve Wiseman of intelliadmin.com.
* Applied patch from Javier Kohen <jkohen@users.sourceforge.net> that
  inform the user that only 8 first characters of the password will
  actually be used when typing more than 8 characters, closes:
  #355619.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Xorg: inftrees.h,v 1.3 2000/08/17 19:46:47 cpqbld Exp $ */
 
2
 
 
3
/* inftrees.h -- header to use inftrees.c
 
4
 * Copyright (C) 1995-1998 Mark Adler
 
5
 * For conditions of distribution and use, see copyright notice in zlib.h 
 
6
 */
 
7
 
 
8
/* WARNING: this file should *not* be used by applications. It is
 
9
   part of the implementation of the compression library and is
 
10
   subject to change. Applications should only use zlib.h.
 
11
 */
 
12
 
 
13
/* Huffman code lookup table entry--this entry is four bytes for machines
 
14
   that have 16-bit pointers (e.g. PC's in the small or medium model). */
 
15
 
 
16
typedef struct inflate_huft_s FAR inflate_huft;
 
17
 
 
18
struct inflate_huft_s {
 
19
  union {
 
20
    struct {
 
21
      Byte Exop;        /* number of extra bits or operation */
 
22
      Byte Bits;        /* number of bits in this code or subcode */
 
23
    } what;
 
24
    Bytef *pad;         /* pad structure to a power of 2 (4 bytes for */
 
25
  } word;               /*  16-bit, 8 bytes for 32-bit machines) */
 
26
  union {
 
27
    uInt Base;          /* literal, length base, or distance base */
 
28
    inflate_huft *Next; /* pointer to next level of table */
 
29
  } more;
 
30
};
 
31
 
 
32
#ifdef DEBUG
 
33
  extern uInt inflate_hufts;
 
34
#endif
 
35
 
 
36
extern int inflate_trees_bits OF((
 
37
    uIntf *,                    /* 19 code lengths */
 
38
    uIntf *,                    /* bits tree desired/actual depth */
 
39
    inflate_huft * FAR *,       /* bits tree result */
 
40
    z_streamp ));               /* for zalloc, zfree functions */
 
41
 
 
42
extern int inflate_trees_dynamic OF((
 
43
    uInt,                       /* number of literal/length codes */
 
44
    uInt,                       /* number of distance codes */
 
45
    uIntf *,                    /* that many (total) code lengths */
 
46
    uIntf *,                    /* literal desired/actual bit depth */
 
47
    uIntf *,                    /* distance desired/actual bit depth */
 
48
    inflate_huft * FAR *,       /* literal/length tree result */
 
49
    inflate_huft * FAR *,       /* distance tree result */
 
50
    z_streamp ));               /* for zalloc, zfree functions */
 
51
 
 
52
extern int inflate_trees_fixed OF((
 
53
    uIntf *,                    /* literal desired/actual bit depth */
 
54
    uIntf *,                    /* distance desired/actual bit depth */
 
55
    inflate_huft * FAR *,       /* literal/length tree result */
 
56
    inflate_huft * FAR *));     /* distance tree result */
 
57
 
 
58
extern int inflate_trees_free OF((
 
59
    inflate_huft *,             /* tables to free */
 
60
    z_streamp ));               /* for zfree function */
 
61