[openbsd-compat/base64.c]
     remove calls to abort(3) that can't happen anyway; from
     <bret dot lambert at gmail.com>; ok millert@ deraadt@
This commit is contained in:
Damien Miller 2007-10-26 16:17:24 +10:00
Родитель a97529fa2e
Коммит 1651f6c40e
2 изменённых файлов: 6 добавлений и 12 удалений

Просмотреть файл

@ -83,6 +83,10 @@
- jakob@cvs.openbsd.org 2007/10/11 18:36:41 - jakob@cvs.openbsd.org 2007/10/11 18:36:41
[openbsd-compat/getrrsetbyname.c] [openbsd-compat/getrrsetbyname.c]
use RRSIG instead of SIG for DNSSEC. ok djm@ use RRSIG instead of SIG for DNSSEC. ok djm@
- 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@
- (djm) [regress/sftp-cmds.sh] - (djm) [regress/sftp-cmds.sh]
Use more restrictive glob to pick up test files from /bin - some platforms Use more restrictive glob to pick up test files from /bin - some platforms
ship broken symlinks there which could spoil the test. ship broken symlinks there which could spoil the test.
@ -3359,4 +3363,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@ passwords between UnixWare and OpenServer they will still work. OK dtucker@
$Id: ChangeLog,v 1.4781 2007/10/26 06:16:09 djm Exp $ $Id: ChangeLog,v 1.4782 2007/10/26 06:17:24 djm Exp $

Просмотреть файл

@ -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. * Copyright (c) 1996 by Internet Software Consortium.
@ -62,9 +62,6 @@
#include "base64.h" #include "base64.h"
/* XXX abort illegal in library */
#define Assert(Cond) if (!(Cond)) abort()
static const char Base64[] = static const char Base64[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static const char Pad64 = '='; static const char Pad64 = '=';
@ -151,10 +148,6 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize)
output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
output[3] = input[2] & 0x3f; 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) if (datalength + 4 > targsize)
return (-1); return (-1);
@ -174,9 +167,6 @@ b64_ntop(u_char const *src, size_t srclength, char *target, size_t targsize)
output[0] = input[0] >> 2; output[0] = input[0] >> 2;
output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4); output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6); 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) if (datalength + 4 > targsize)
return (-1); return (-1);