Check for malloc(0) to make AIX happy
Prompted by [HEIMDAL-646] by Anton Lundin
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user