Deleted Added
full compact
dns.c (157016) dns.c (162852)
1/* $OpenBSD: dns.c,v 1.16 2005/10/17 14:13:35 stevesk Exp $ */
1/* $OpenBSD: dns.c,v 1.23 2006/08/03 03:34:42 deraadt Exp $ */
2
3/*
4 * Copyright (c) 2003 Wesley Griffin. All rights reserved.
5 * Copyright (c) 2003 Jakob Schlyter. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 11 unchanged lines hidden (view full) ---

21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include "includes.h"
2
3/*
4 * Copyright (c) 2003 Wesley Griffin. All rights reserved.
5 * Copyright (c) 2003 Jakob Schlyter. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:

--- 11 unchanged lines hidden (view full) ---

21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include "includes.h"
29RCSID("$OpenBSD: dns.c,v 1.16 2005/10/17 14:13:35 stevesk Exp $");
30
29
30#include <sys/types.h>
31#include <sys/socket.h>
32
31#include <netdb.h>
33#include <netdb.h>
34#include <stdarg.h>
35#include <stdio.h>
36#include <string.h>
32
33#include "xmalloc.h"
34#include "key.h"
35#include "dns.h"
36#include "log.h"
37
38static const char *errset_text[] = {
39 "success", /* 0 ERRSET_SUCCESS */

--- 77 unchanged lines hidden (view full) ---

117 *algorithm = rdata[0];
118 *digest_type = rdata[1];
119 *digest_len = rdata_len - 2;
120
121 if (*digest_len > 0) {
122 *digest = (u_char *) xmalloc(*digest_len);
123 memcpy(*digest, rdata + 2, *digest_len);
124 } else {
37
38#include "xmalloc.h"
39#include "key.h"
40#include "dns.h"
41#include "log.h"
42
43static const char *errset_text[] = {
44 "success", /* 0 ERRSET_SUCCESS */

--- 77 unchanged lines hidden (view full) ---

122 *algorithm = rdata[0];
123 *digest_type = rdata[1];
124 *digest_len = rdata_len - 2;
125
126 if (*digest_len > 0) {
127 *digest = (u_char *) xmalloc(*digest_len);
128 memcpy(*digest, rdata + 2, *digest_len);
129 } else {
125 *digest = xstrdup("");
130 *digest = (u_char *)xstrdup("");
126 }
127
128 success = 1;
129 }
130
131 return success;
132}
133

--- 158 unchanged lines hidden ---
131 }
132
133 success = 1;
134 }
135
136 return success;
137}
138

--- 158 unchanged lines hidden ---