summaryrefslogtreecommitdiffstats
path: root/base64.c
diff options
context:
space:
mode:
authorJames Yonan <james@openvpn.net>2010-12-13 09:27:08 +0000
committerDavid Sommerseth <davids@redhat.com>2011-03-25 09:38:48 +0100
commit7fc00d4cbe87206eea3ff5a8d12908c8c942f045 (patch)
treef912cf7fef1c9be191d2fadc0c05ac9a984da2d3 /base64.c
parentcf69617bbea45a15423c4188daa9386debcbe1ec (diff)
downloadopenvpn-7fc00d4cbe87206eea3ff5a8d12908c8c942f045.tar.gz
openvpn-7fc00d4cbe87206eea3ff5a8d12908c8c942f045.tar.xz
openvpn-7fc00d4cbe87206eea3ff5a8d12908c8c942f045.zip
Misc fixes to r6708.
Fixed issue where "signal SIGTERM" entered from the management interface might get subsequently downgraded to a SIGUSR1. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@6716 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'base64.c')
-rw-r--r--base64.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/base64.c b/base64.c
index 8f0fb6c..26ca7d7 100644
--- a/base64.c
+++ b/base64.c
@@ -50,6 +50,8 @@ base64_encode(const void *data, int size, char **str)
int c;
const unsigned char *q;
+ if (size < 0)
+ return -1;
p = s = (char *) malloc(size * 4 / 3 + 4);
if (p == NULL)
return -1;