Check for malloc(0) to make AIX happy

Prompted by [HEIMDAL-646] by Anton Lundin
This commit is contained in:
Love Hornquist Astrand
2009-09-24 07:32:35 -07:00
parent 98f2421134
commit 9bace01559
5 changed files with 17 additions and 4 deletions

View File

@@ -280,6 +280,11 @@ _wind_stringprep_normalize(const uint32_t *in, size_t in_len,
uint32_t *tmp;
int ret;
if (in_len == 0) {
*out_len = 0;
return 0;
}
tmp_len = in_len * 4;
if (tmp_len < MAX_LENGTH_CANON)
tmp_len = MAX_LENGTH_CANON;