From 1d978b3ba2f0b9ed1c07e8d195d64a63c2cea3cc Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Mon, 17 May 1999 04:49:38 +0000 Subject: [PATCH] base64_totext() encoded 16-bit final quantum incorrectly --- lib/dns/rdata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dns/rdata.c b/lib/dns/rdata.c index e9cf23ca77..94de12ee1a 100644 --- a/lib/dns/rdata.c +++ b/lib/dns/rdata.c @@ -15,7 +15,7 @@ * SOFTWARE. */ - /* $Id: rdata.c,v 1.42 1999/05/07 03:24:05 marka Exp $ */ + /* $Id: rdata.c,v 1.43 1999/05/17 04:49:38 gson Exp $ */ #include @@ -969,7 +969,7 @@ base64_totext(isc_region_t *source, isc_buffer_t *target) { buf[0] = base64[(source->base[0]>>2)&0x3f]; buf[1] = base64[((source->base[0]<<4)&0x30)| ((source->base[1]>>4)&0x0f)]; - buf[2] = base64[((source->base[1]<<4)&0x3c)]; + buf[2] = base64[((source->base[1]<<2)&0x3c)]; buf[3] = '='; RETERR(str_totext(buf, target)); } else if (source->length == 1) {