diff options
author | otto <> | 2006-10-21 09:55:03 +0000 |
---|---|---|
committer | otto <> | 2006-10-21 09:55:03 +0000 |
commit | e1dcd644aa891adcbd561d7688084819368c4139 (patch) | |
tree | bb7f0787ea9adf228392f125521a0fdb38e9a9e8 /src | |
parent | 16f6f01d893bb3c377c284a5f79e939ae8263918 (diff) | |
download | openbsd-e1dcd644aa891adcbd561d7688084819368c4139.tar.gz openbsd-e1dcd644aa891adcbd561d7688084819368c4139.tar.bz2 openbsd-e1dcd644aa891adcbd561d7688084819368c4139.zip |
remove calls to abort(3) that can't happen anyway; from
<bret dot lambert at gmail.com>; ok millert@ deraadt@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libc/net/base64.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/lib/libc/net/base64.c b/src/lib/libc/net/base64.c index 33b6ffdc41..d432c48d5c 100644 --- a/src/lib/libc/net/base64.c +++ b/src/lib/libc/net/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. |
@@ -56,9 +56,6 @@ | |||
56 | #include <stdlib.h> | 56 | #include <stdlib.h> |
57 | #include <string.h> | 57 | #include <string.h> |
58 | 58 | ||
59 | /* XXX abort illegal in library */ | ||
60 | #define Assert(Cond) if (!(Cond)) abort() | ||
61 | |||
62 | static const char Base64[] = | 59 | static const char Base64[] = |
63 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | 60 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
64 | static const char Pad64 = '='; | 61 | static const char Pad64 = '='; |
@@ -148,10 +145,6 @@ b64_ntop(src, srclength, target, targsize) | |||
148 | output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); | 145 | output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); |
149 | output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); | 146 | output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); |
150 | output[3] = input[2] & 0x3f; | 147 | output[3] = input[2] & 0x3f; |
151 | Assert(output[0] < 64); | ||
152 | Assert(output[1] < 64); | ||
153 | Assert(output[2] < 64); | ||
154 | Assert(output[3] < 64); | ||
155 | 148 | ||
156 | if (datalength + 4 > targsize) | 149 | if (datalength + 4 > targsize) |
157 | return (-1); | 150 | return (-1); |
@@ -171,9 +164,6 @@ b64_ntop(src, srclength, target, targsize) | |||
171 | output[0] = input[0] >> 2; | 164 | output[0] = input[0] >> 2; |
172 | output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); | 165 | output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); |
173 | output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); | 166 | output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); |
174 | Assert(output[0] < 64); | ||
175 | Assert(output[1] < 64); | ||
176 | Assert(output[2] < 64); | ||
177 | 167 | ||
178 | if (datalength + 4 > targsize) | 168 | if (datalength + 4 > targsize) |
179 | return (-1); | 169 | return (-1); |