summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2007-10-26 16:17:24 +1000
committerDamien Miller <djm@mindrot.org>2007-10-26 16:17:24 +1000
commit1651f6c40eaba61a6a2f30b79c57348e6906070f (patch)
treeeb9b34baa7990bea75282b96583c20089f615f5b
parenta97529fa2ead2e6fa88de3cc599832cf1e3bc4eb (diff)
- otto@cvs.openbsd.org 2006/10/21 09:55:03
[openbsd-compat/base64.c] remove calls to abort(3) that can't happen anyway; from <bret dot lambert at gmail.com>; ok millert@ deraadt@
-rw-r--r--ChangeLog6
-rw-r--r--openbsd-compat/base64.c12
2 files changed, 6 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 617074ac2..13462df4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -83,6 +83,10 @@
83 - jakob@cvs.openbsd.org 2007/10/11 18:36:41 83 - jakob@cvs.openbsd.org 2007/10/11 18:36:41
84 [openbsd-compat/getrrsetbyname.c] 84 [openbsd-compat/getrrsetbyname.c]
85 use RRSIG instead of SIG for DNSSEC. ok djm@ 85 use RRSIG instead of SIG for DNSSEC. ok djm@
86 - otto@cvs.openbsd.org 2006/10/21 09:55:03
87 [openbsd-compat/base64.c]
88 remove calls to abort(3) that can't happen anyway; from
89 <bret dot lambert at gmail.com>; ok millert@ deraadt@
86 - (djm) [regress/sftp-cmds.sh] 90 - (djm) [regress/sftp-cmds.sh]
87 Use more restrictive glob to pick up test files from /bin - some platforms 91 Use more restrictive glob to pick up test files from /bin - some platforms
88 ship broken symlinks there which could spoil the test. 92 ship broken symlinks there which could spoil the test.
@@ -3359,4 +3363,4 @@
3359 OpenServer 6 and add osr5bigcrypt support so when someone migrates 3363 OpenServer 6 and add osr5bigcrypt support so when someone migrates
3360 passwords between UnixWare and OpenServer they will still work. OK dtucker@ 3364 passwords between UnixWare and OpenServer they will still work. OK dtucker@
3361 3365
3362$Id: ChangeLog,v 1.4781 2007/10/26 06:16:09 djm Exp $ 3366$Id: ChangeLog,v 1.4782 2007/10/26 06:17:24 djm Exp $
diff --git a/openbsd-compat/base64.c b/openbsd-compat/base64.c
index 9a60f583b..9e7466716 100644
--- a/openbsd-compat/base64.c
+++ b/openbsd-compat/base64.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: base64.c,v 1.4 2002/01/02 23:00:10 deraadt Exp $ */ 1/* $OpenBSD: base64.c,v 1.5 2006/10/21 09:55:03 otto Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996 by Internet Software Consortium. 4 * Copyright (c) 1996 by Internet Software Consortium.
@@ -62,9 +62,6 @@
62 62
63#include "base64.h" 63#include "base64.h"
64 64
65/* XXX abort illegal in library */
66#define Assert(Cond) if (!(Cond)) abort()
67
68static const char Base64[] = 65static const char Base64[] =
69 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 66 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
70static const char Pad64 = '='; 67static const char Pad64 = '=';
@@ -151,10 +148,6 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize)
151 output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); 148 output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
152 output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); 149 output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
153 output[3] = input[2] & 0x3f; 150 output[3] = input[2] & 0x3f;
154 Assert(output[0] < 64);
155 Assert(output[1] < 64);
156 Assert(output[2] < 64);
157 Assert(output[3] < 64);
158 151
159 if (datalength + 4 > targsize) 152 if (datalength + 4 > targsize)
160 return (-1); 153 return (-1);
@@ -174,9 +167,6 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize)
174 output[0] = input[0] >> 2; 167 output[0] = input[0] >> 2;
175 output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); 168 output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
176 output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); 169 output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
177 Assert(output[0] < 64);
178 Assert(output[1] < 64);
179 Assert(output[2] < 64);
180 170
181 if (datalength + 4 > targsize) 171 if (datalength + 4 > targsize)
182 return (-1); 172 return (-1);