Home
last modified time | relevance | path

Searched refs:utf8_buf (Results 1 – 2 of 2) sorted by relevance

/PHP-8.3/ext/fileinfo/libmagic/
H A Dascmagic.c112 unsigned char *utf8_buf = NULL, *utf8_end; in file_ascmagic_with_encoding() local
146 if ((utf8_buf = CAST(unsigned char *, emalloc(mlen))) == NULL) { in file_ascmagic_with_encoding()
150 if ((utf8_end = encode_utf8(utf8_buf, mlen, ubuf, ulen)) in file_ascmagic_with_encoding()
155 buffer_init(&bb, b->fd, &b->st, utf8_buf, in file_ascmagic_with_encoding()
156 CAST(size_t, utf8_end - utf8_buf)); in file_ascmagic_with_encoding()
335 if (utf8_buf) in file_ascmagic_with_encoding()
336 efree(utf8_buf); in file_ascmagic_with_encoding()
/PHP-8.3/ext/fileinfo/
H A Dlibmagic.patch881 - if ((utf8_buf = CAST(unsigned char *, malloc(mlen))) == NULL) {
882 + if ((utf8_buf = CAST(unsigned char *, emalloc(mlen))) == NULL) {
886 if ((utf8_end = encode_utf8(utf8_buf, mlen, ubuf, ulen))
892 buffer_init(&bb, b->fd, &b->st, utf8_buf,
893 CAST(size_t, utf8_end - utf8_buf));
910 - free(utf8_buf);
911 + if (utf8_buf)
912 + efree(utf8_buf);

Completed in 9 milliseconds