summaryrefslogtreecommitdiff
path: root/src/openvpn/base64.c
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2014-10-29 17:43:51 +0100
committerAlberto Gonzalez Iniesta <agi@inittab.org>2014-10-29 17:43:51 +0100
commit63862ed15e1abb4b29c5a43b469321c928613c62 (patch)
tree9c21e69bf5a514459227f5e32f75b8e12916c03f /src/openvpn/base64.c
parent809daf3b371e0c2457b5d4bd414382eb67bf8348 (diff)
Imported Upstream version 2.3.5upstream/2.3.5
Diffstat (limited to 'src/openvpn/base64.c')
-rw-r--r--src/openvpn/base64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvpn/base64.c b/src/openvpn/base64.c
index bb89aae..7dccec2 100644
--- a/src/openvpn/base64.c
+++ b/src/openvpn/base64.c
@@ -110,7 +110,7 @@ token_decode(const char *token)
int i;
unsigned int val = 0;
int marker = 0;
- if (strlen(token) < 4)
+ if (!token[0] || !token[1] || !token[2] || !token[3])
return DECODE_ERROR;
for (i = 0; i < 4; i++) {
val *= 64;