Use right type when mallocing data (allocated too much)

This commit is contained in:
Love Hornquist Astrand
2009-10-11 15:08:27 -07:00
parent 119eb68a2e
commit e1b14b7854

View File

@@ -98,7 +98,7 @@ test(char *buf, unsigned lineno)
c = last;
norm_len = MAX_LENGTH_CANON;
tmp = malloc(norm_len * sizeof(size_t));
tmp = malloc(norm_len * sizeof(uint32_t));
if (tmp == NULL && norm_len != 0)
err(1, "malloc");
ret = _wind_stringprep_normalize(in, in_len, tmp, &norm_len);