~kernevil/ubuntu/trusty/bind9/sdlz-hmac-keys

« back to all changes in this revision

Viewing changes to bin/tests/names/t_names.c

  • Committer: Package Import Robot
  • Author(s): LaMont Jones, Matthew Grant, LaMont Jones
  • Date: 2012-10-29 08:37:49 UTC
  • mfrom: (1.9.2)
  • Revision ID: package-import@ubuntu.com-20121029083749-r9inpzl0yuj9xdlu
Tags: 1:9.8.4.dfsg-1
[Matthew Grant]

* Turn off dlopen as it was causing test compile failures.
* Add missing library .postrm files for debhelper

[LaMont Jones]

* New upstream version
* soname fixup
* Ack NMUs

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2004-2009, 2011  Internet Systems Consortium, Inc. ("ISC")
 
2
 * Copyright (C) 2004-2009, 2011, 2012  Internet Systems Consortium, Inc. ("ISC")
3
3
 * Copyright (C) 1998-2003  Internet Software Consortium.
4
4
 *
5
5
 * Permission to use, copy, modify, and/or distribute this software for any
15
15
 * PERFORMANCE OF THIS SOFTWARE.
16
16
 */
17
17
 
18
 
/* $Id: t_names.c,v 1.50.346.2 2011-03-12 04:59:15 tbox Exp $ */
 
18
/* $Id: t_names.c,v 1.50.346.2 2011/03/12 04:59:15 tbox Exp $ */
19
19
 
20
20
#include <config.h>
21
21
 
121
121
 
122
122
                        if (('0' <= *q) && (*q <= '9'))
123
123
                                *p = *q - '0';
124
 
                        else if (('a' <= *q) && (*q <= 'z'))
 
124
                        else if (('a' <= *q) && (*q <= 'f'))
125
125
                                *p = *q - 'a' + 10;
126
 
                        else if (('A' <= *q) && (*q <= 'Z'))
 
126
                        else if (('A' <= *q) && (*q <= 'F'))
127
127
                                *p = *q - 'A' + 10;
 
128
                        else {
 
129
                                t_info("malformed comparison data\n");
 
130
                                free(data);
 
131
                                return (-1);
 
132
                        }
128
133
                        ++q;
129
134
 
130
135
                        *p <<= 4;
131
136
 
132
137
                        if (('0' <= *q) && (*q <= '9'))
133
138
                                *p |= ((*q - '0') & 0x0f);
134
 
                        else if (('a' <= *q) && (*q <= 'z'))
 
139
                        else if (('a' <= *q) && (*q <= 'f'))
135
140
                                *p |= ((*q - 'a' + 10) & 0x0f);
136
 
                        else if (('A' <= *q) && (*q <= 'Z'))
 
141
                        else if (('A' <= *q) && (*q <= 'F'))
137
142
                                *p |= ((*q - 'A' + 10) & 0x0f);
 
143
                        else {
 
144
                                t_info("malformed comparison data\n");
 
145
                                free(data);
 
146
                                return (-1);
 
147
                        }
138
148
                        ++p;
139
149
                        ++q;
140
150
                        ++cnt;
203
213
                }
204
214
                if (('0' <= c) && (c <= '9'))
205
215
                        val = c - '0';
206
 
                else if (('a' <= c) && (c <= 'z'))
 
216
                else if (('a' <= c) && (c <= 'f'))
207
217
                        val = c - 'a' + 10;
208
 
                else if (('A' <= c) && (c <= 'Z'))
 
218
                else if (('A' <= c) && (c <= 'F'))
209
219
                        val = c - 'A'+ 10;
210
220
                else {
211
221
                        (void)fclose(fp);