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

« back to all changes in this revision

Viewing changes to unix/xc/extras/freetype2/src/cid/cidparse.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
/***************************************************************************/
 
2
/*                                                                         */
 
3
/*  cidparse.h                                                             */
 
4
/*                                                                         */
 
5
/*    CID-keyed Type1 parser (specification).                              */
 
6
/*                                                                         */
 
7
/*  Copyright 1996-2001, 2002 by                                           */
 
8
/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 
9
/*                                                                         */
 
10
/*  This file is part of the FreeType project, and may only be used,       */
 
11
/*  modified, and distributed under the terms of the FreeType project      */
 
12
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
 
13
/*  this file you indicate that you have read the license and              */
 
14
/*  understand and accept it fully.                                        */
 
15
/*                                                                         */
 
16
/***************************************************************************/
 
17
 
 
18
 
 
19
#ifndef __CIDPARSE_H__
 
20
#define __CIDPARSE_H__
 
21
 
 
22
 
 
23
#include <ft2build.h>
 
24
#include FT_INTERNAL_TYPE1_TYPES_H
 
25
#include FT_INTERNAL_STREAM_H
 
26
#include FT_INTERNAL_POSTSCRIPT_AUX_H
 
27
 
 
28
 
 
29
FT_BEGIN_HEADER
 
30
 
 
31
 
 
32
  /*************************************************************************/
 
33
  /*                                                                       */
 
34
  /* <Struct>                                                              */
 
35
  /*    CID_Parser                                                         */
 
36
  /*                                                                       */
 
37
  /* <Description>                                                         */
 
38
  /*    A CID_Parser is an object used to parse a Type 1 fonts very        */
 
39
  /*    quickly.                                                           */
 
40
  /*                                                                       */
 
41
  /* <Fields>                                                              */
 
42
  /*    root           :: The root PS_ParserRec fields.                    */
 
43
  /*                                                                       */
 
44
  /*    stream         :: The current input stream.                        */
 
45
  /*                                                                       */
 
46
  /*    postscript     :: A pointer to the data to be parsed.              */
 
47
  /*                                                                       */
 
48
  /*    postscript_len :: The length of the data to be parsed.             */
 
49
  /*                                                                       */
 
50
  /*    data_offset    :: The start position of the binary data (i.e., the */
 
51
  /*                      end of the data to be parsed.                    */
 
52
  /*                                                                       */
 
53
  /*    cid            :: A structure which holds the information about    */
 
54
  /*                      the current font.                                */
 
55
  /*                                                                       */
 
56
  /*    num_dict       :: The number of font dictionaries.                 */
 
57
  /*                                                                       */
 
58
  typedef struct  CID_Parser_
 
59
  {
 
60
    PS_ParserRec  root;
 
61
    FT_Stream     stream;
 
62
 
 
63
    FT_Byte*      postscript;
 
64
    FT_Int        postscript_len;
 
65
 
 
66
    FT_ULong      data_offset;
 
67
 
 
68
    CID_FaceInfo  cid;
 
69
    FT_Int        num_dict;
 
70
 
 
71
  } CID_Parser;
 
72
 
 
73
 
 
74
  FT_LOCAL( FT_Error )
 
75
  CID_New_Parser( CID_Parser*    parser,
 
76
                  FT_Stream      stream,
 
77
                  FT_Memory      memory,
 
78
                  PSAux_Service  psaux );
 
79
 
 
80
  FT_LOCAL( void )
 
81
  CID_Done_Parser( CID_Parser*  parser );
 
82
 
 
83
 
 
84
  /*************************************************************************/
 
85
  /*                                                                       */
 
86
  /*                            PARSING ROUTINES                           */
 
87
  /*                                                                       */
 
88
  /*************************************************************************/
 
89
 
 
90
#define CID_Skip_Spaces( p )  (p)->root.funcs.skip_spaces( &(p)->root )
 
91
#define CID_Skip_Alpha( p )   (p)->root.funcs.skip_alpha ( &(p)->root )
 
92
 
 
93
#define CID_ToInt( p )        (p)->root.funcs.to_int( &(p)->root )
 
94
#define CID_ToFixed( p, t )   (p)->root.funcs.to_fixed( &(p)->root, t )
 
95
 
 
96
#define CID_ToCoordArray( p, m, c )                          \
 
97
          (p)->root.funcs.to_coord_array( &(p)->root, m, c )
 
98
#define CID_ToFixedArray( p, m, f, t )                          \
 
99
          (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
 
100
#define CID_ToToken( p, t )                         \
 
101
          (p)->root.funcs.to_token( &(p)->root, t )
 
102
#define CID_ToTokenArray( p, t, m, c )                          \
 
103
          (p)->root.funcs.to_token_array( &(p)->root, t, m, c )
 
104
 
 
105
#define CID_Load_Field( p, f, o )                              \
 
106
          (p)->root.funcs.load_field( &(p)->root, f, o, 0, 0 )
 
107
#define CID_Load_Field_Table( p, f, o )                              \
 
108
          (p)->root.funcs.load_field_table( &(p)->root, f, o, 0, 0 )
 
109
 
 
110
 
 
111
FT_END_HEADER
 
112
 
 
113
#endif /* __CIDPARSE_H__ */
 
114
 
 
115
 
 
116
/* END */