unicode: add utf16decode with utf8 buffer size check

Make use of it in id3tags and cuesheet

Change-Id: I153c23f1f7312e9d5e1de9f03725f2d2ab0abc93
This commit is contained in:
Roman Artiukhin 2024-12-14 12:54:00 +02:00 committed by Solomon Peachy
parent e334a1f95e
commit 1f548f74e6
4 changed files with 34 additions and 42 deletions

View file

@ -61,6 +61,7 @@ unsigned char* iso_decode_ex(const unsigned char *iso, unsigned char *utf8, int
unsigned char* utf16LEdecode(const unsigned char *utf16, unsigned char *utf8, int count);
unsigned char* utf16BEdecode(const unsigned char *utf16, unsigned char *utf8, int count);
unsigned char* utf16decode(const unsigned char *utf16, unsigned char *utf8, int count, int utf8_size, bool le);
bool utf16_has_bom(const unsigned char *utf16, bool *le);
unsigned long utf8length(const unsigned char *utf8);
const unsigned char* utf8decode(const unsigned char *utf8, unsigned short *ucs);