diff options
author | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-10-21 09:55:04 +0000 |
---|---|---|
committer | Otto Moerbeek <otto@cvs.openbsd.org> | 2006-10-21 09:55:04 +0000 |
commit | 9b4de08982245b9360c6dd535e82cf9268bed2a9 (patch) | |
tree | d6ff495ee6ff720a9efc44ddab048b4aa3f185c4 | |
parent | dd98b50bc85201486c023d89677287827298d979 (diff) |
remove calls to abort(3) that can't happen anyway; from
<bret dot lambert at gmail.com>; ok millert@ deraadt@
-rw-r--r-- | lib/libc/net/base64.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/libc/net/base64.c b/lib/libc/net/base64.c index 33b6ffdc41e..d432c48d5c9 100644 --- a/lib/libc/net/base64.c +++ b/lib/libc/net/base64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: base64.c,v 1.4 2002/01/02 23:00:10 deraadt Exp $ */ +/* $OpenBSD: base64.c,v 1.5 2006/10/21 09:55:03 otto Exp $ */ /* * Copyright (c) 1996 by Internet Software Consortium. @@ -56,9 +56,6 @@ #include <stdlib.h> #include <string.h> -/* XXX abort illegal in library */ -#define Assert(Cond) if (!(Cond)) abort() - static const char Base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static const char Pad64 = '='; @@ -148,10 +145,6 @@ b64_ntop(src, srclength, target, targsize) output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); output[3] = input[2] & 0x3f; - Assert(output[0] < 64); - Assert(output[1] < 64); - Assert(output[2] < 64); - Assert(output[3] < 64); if (datalength + 4 > targsize) return (-1); @@ -171,9 +164,6 @@ b64_ntop(src, srclength, target, targsize) output[0] = input[0] >> 2; output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); - Assert(output[0] < 64); - Assert(output[1] < 64); - Assert(output[2] < 64); if (datalength + 4 > targsize) return (-1); |