faster and safer dbuf functions (#443)

This commit is contained in:
Fabrice Bellard
2025-10-13 13:51:25 +02:00
parent 2a53de04c6
commit 0d4cd2d051
5 changed files with 77 additions and 35 deletions

View File

@@ -1179,7 +1179,7 @@ int unicode_normalize(uint32_t **pdst, const uint32_t *src, int src_len,
is_compat = n_type >> 1;
dbuf_init2(dbuf, opaque, realloc_func);
if (dbuf_realloc(dbuf, sizeof(int) * src_len))
if (dbuf_claim(dbuf, sizeof(int) * src_len))
goto fail;
/* common case: latin1 is unaffected by NFC */