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

« back to all changes in this revision

Viewing changes to unix/xc/extras/X-TrueType/MULEENCODING/main.c

  • 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
/* ===EmacsMode: -*- Mode: C; tab-width:4; c-basic-offset: 4; -*- === */
 
2
/* ===FileName: ===
 
3
   Copyright (c) 1998 Takuya SHIOZAKI, All Rights reserved.
 
4
   Copyright (c) 1998 X-TrueType Server Project, All rights reserved. 
 
5
   Copyright (c) 1998,1999 Pablo Saratxaga <srtxg@chanae.alphanet.ch>
 
6
   
 
7
===Notice
 
8
   Redistribution and use in source and binary forms, with or without
 
9
   modification, are permitted provided that the following conditions
 
10
   are met:
 
11
   1. Redistributions of source code must retain the above copyright
 
12
      notice, this list of conditions and the following disclaimer.
 
13
   2. Redistributions in binary form must reproduce the above copyright
 
14
      notice, this list of conditions and the following disclaimer in the
 
15
      documentation and/or other materials provided with the distribution.
 
16
 
 
17
   THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
 
18
   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 
19
   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 
20
   ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
 
21
   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 
22
   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 
23
   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 
24
   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 
25
   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 
26
   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 
27
   SUCH DAMAGE.
 
28
 
 
29
   Major Release ID: X-TrueType Server Version 1.3 [Aoi MATSUBARA Release 3]
 
30
 
 
31
Notice===
 
32
 
 
33
 */
 
34
 
 
35
#include "xttversion.h"
 
36
 
 
37
static char const * const releaseID =
 
38
    _XTT_RELEASE_NAME;
 
39
 
 
40
#include "xttcommon.h"
 
41
#include "xttcap.h"
 
42
#include "xttcconv.h"
 
43
#include "xttcconvP.h"
 
44
 
 
45
 
 
46
typedef enum
 
47
{
 
48
    MULELAO,
 
49
    ASCIILAO
 
50
} CharSetMagic;
 
51
 
 
52
static CharSetRelation const charSetRelations[] = {
 
53
    { "mulelao",     NULL,      "1", MULELAO,
 
54
                { 0x20, 0xff,    0,    0, 0x20 } },
 
55
    { "ibm",         NULL, "cp1133", ASCIILAO,
 
56
                { 0x20, 0xff,    0,    0, 0x20 } },
 
57
/*  { "muletibetan", NULL,     NULL, MULETIBETAN,
 
58
                { 0x21, 0x75, 0x21, 0x25, 0x2121 } }, */
 
59
    { NULL, NULL, NULL, 0, { 0, 0, 0, 0, 0 } }
 
60
};
 
61
 
 
62
 
 
63
CODECONV_TEMPLATE(cc_mulelao1_to_ucs2);
 
64
CODECONV_TEMPLATE(cc_asciilao_to_ucs2);
 
65
static MapIDRelation const mapIDRelations[] = {
 
66
    { MULELAO,        EPlfmISO,     EEncISO10646,
 
67
                                cc_mulelao1_to_ucs2,            NULL },
 
68
    { MULELAO,        EPlfmUnicode, EEncAny,
 
69
                                cc_mulelao1_to_ucs2,            NULL },
 
70
    { MULELAO,        EPlfmMS,      EEncMSUnicode,
 
71
                                cc_mulelao1_to_ucs2,            NULL },
 
72
    { ASCIILAO,       EPlfmISO,     EEncISO10646,
 
73
                                cc_asciilao_to_ucs2,            NULL },
 
74
    { ASCIILAO,       EPlfmUnicode, EEncAny,
 
75
                                cc_asciilao_to_ucs2,            NULL },
 
76
    { ASCIILAO,       EPlfmMS,      EEncMSUnicode,
 
77
                                cc_asciilao_to_ucs2,            NULL },
 
78
    { -1, 0, 0, NULL, NULL }
 
79
};
 
80
 
 
81
STD_ENTRYFUNC_TEMPLATE(MULEENCODING_entrypoint)
 
82
 
 
83
/* end of file */