Commit 1d978b3b authored by Andreas Gustafsson's avatar Andreas Gustafsson
Browse files

base64_totext() encoded 16-bit final quantum incorrectly

parent 70fd6276
......@@ -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 <config.h>
......@@ -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) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment