summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/wind/stringprep.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-11-13 10:51:14 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-11-13 23:19:05 +1100
commit4f8ba5ad6ac9b7153b0e13654e59f47e67b3f608 (patch)
treeca189d440b0a298cdcb3769d994828508dcd2e76 /source4/heimdal/lib/wind/stringprep.c
parent5bc87c14a1f5b45ed86e7ff9663f5f0aa2f70094 (diff)
downloadsamba-4f8ba5ad6ac9b7153b0e13654e59f47e67b3f608.tar.gz
samba-4f8ba5ad6ac9b7153b0e13654e59f47e67b3f608.tar.bz2
samba-4f8ba5ad6ac9b7153b0e13654e59f47e67b3f608.zip
s4:heimdal: import lorikeet-heimdal-200911122202 (commit 9291fd2d101f3eecec550178634faa94ead3e9a1)
Diffstat (limited to 'source4/heimdal/lib/wind/stringprep.c')
-rw-r--r--source4/heimdal/lib/wind/stringprep.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/heimdal/lib/wind/stringprep.c b/source4/heimdal/lib/wind/stringprep.c
index a991f20cfb..ec4657665e 100644
--- a/source4/heimdal/lib/wind/stringprep.c
+++ b/source4/heimdal/lib/wind/stringprep.c
@@ -58,10 +58,16 @@ wind_stringprep(const uint32_t *in, size_t in_len,
wind_profile_flags flags)
{
size_t tmp_len = in_len * 3;
- uint32_t *tmp = malloc(tmp_len * sizeof(uint32_t));
+ uint32_t *tmp;
int ret;
size_t olen;
+ if (in_len == 0) {
+ *out_len = 0;
+ return 0;
+ }
+
+ tmp = malloc(tmp_len * sizeof(uint32_t));
if (tmp == NULL)
return ENOMEM;