Home
last modified time | relevance | path

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

/PHP-5.5/ext/fileinfo/libmagic/
H A Dascmagic.c105 unsigned char *utf8_buf = NULL, *utf8_end; in file_ascmagic_with_encoding() local
142 if ((utf8_buf = CAST(unsigned char *, emalloc(mlen))) == NULL) { in file_ascmagic_with_encoding()
146 if ((utf8_end = encode_utf8(utf8_buf, mlen, ubuf, ulen)) in file_ascmagic_with_encoding()
149 if ((rv = file_softmagic(ms, utf8_buf, in file_ascmagic_with_encoding()
150 (size_t)(utf8_end - utf8_buf), 0, TEXTTEST, text)) == 0) in file_ascmagic_with_encoding()
300 if (utf8_buf) in file_ascmagic_with_encoding()
301 efree(utf8_buf); in file_ascmagic_with_encoding()
/PHP-5.5/ext/fileinfo/
H A Dlibmagic.patch850 - if ((utf8_buf = CAST(unsigned char *, malloc(mlen))) == NULL) {
851 + if ((utf8_buf = CAST(unsigned char *, emalloc(mlen))) == NULL) {
858 if ((rv = file_softmagic(ms, utf8_buf,
859 - (size_t)(utf8_end - utf8_buf), TEXTTEST, text)) == 0)
860 + (size_t)(utf8_end - utf8_buf), 0, TEXTTEST, text)) == 0)
876 - free(utf8_buf);
877 + if (utf8_buf)
878 + efree(utf8_buf);

Completed in 17 milliseconds