From cd1d7f4be7d31388ab79c797acaf6d7730113112 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 5 Aug 2009 11:25:50 +1000 Subject: s4:heimdal: import lorikeet-heimdal-200908050050 (commit 8714779fa7376fd9f7761587639e68b48afc8c9c) This also adds a new hdb-glue.c file, to cope with Heimdal's uncondtional enabling of SQLITE. (Very reasonable, but not required for Samba4's use). Andrew Bartlett --- source4/heimdal/lib/roken/base64.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source4/heimdal/lib/roken/base64.c') diff --git a/source4/heimdal/lib/roken/base64.c b/source4/heimdal/lib/roken/base64.c index 5e720eb6d4..bc74391b56 100644 --- a/source4/heimdal/lib/roken/base64.c +++ b/source4/heimdal/lib/roken/base64.c @@ -58,6 +58,11 @@ base64_encode(const void *data, int size, char **str) int c; const unsigned char *q; + if (size > INT_MAX/4 || size < 0) { + *str = NULL; + return -1; + } + p = s = (char *) malloc(size * 4 / 3 + 4); if (p == NULL) { *str = NULL; -- cgit