From 65399bc233d5f8910bf589d08b43b933975b462a Mon Sep 17 00:00:00 2001 From: fredrik Date: Sat, 5 Nov 2005 12:38:19 +0000 Subject: [PATCH] Handle newlines in base{64,32} gracefully. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@471 959494ce-11ee-0310-bf91-de5d638817bd --- daemon/utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daemon/utils.c b/daemon/utils.c index c006b4f..8e38459 100644 --- a/daemon/utils.c +++ b/daemon/utils.c @@ -533,6 +533,8 @@ char *base64decode(char *data, size_t *datalen) c = (int)(unsigned char)*data; if(c == '=') break; + if(c == '\n') + continue; if(base64rev[c] == -1) { if(buf != NULL) @@ -630,6 +632,8 @@ char *base32decode(char *data, size_t *datalen) c = (int)(unsigned char)*data; if(c == '=') break; + if(c == '\n') + continue; if(base32rev[c] == -1) { if(buf != NULL) -- 2.11.0