struct dictionary *
dict_create (const char *encoding)
{
- struct dictionary *d = xzalloc (sizeof *d);
+ struct dictionary *d = XZALLOC (struct dictionary);
d->encoding = xstrdup (encoding);
d->names_must_be_ids = true;
size_t ofs;
int mblen;
+ if (hint_len > ID_MAX_LEN)
+ hint_len = ID_MAX_LEN;
+
/* The allocation size here is OK: characters that are copied directly fit
OK, and characters that are not copied directly are replaced by a single
'_' byte. If u8_mbtouc() replaces bad input by 0xfffd, then that will get
if (hinted_name != NULL)
return hinted_name;
}
+
return make_numeric_name (dict, num_start);
}