Searched refs:utf8_buf (Results 1 – 2 of 2) sorted by path
/PHP-7.4/ext/fileinfo/ |
H A D | libmagic.patch | 991 - if ((utf8_buf = CAST(unsigned char *, malloc(mlen))) == NULL) { 992 + if ((utf8_buf = CAST(unsigned char *, emalloc(mlen))) == NULL) { 1000 - free(utf8_buf); 1001 + if (utf8_buf) 1002 + efree(utf8_buf);
|
/PHP-7.4/ext/fileinfo/libmagic/ |
H A D | ascmagic.c | 112 unsigned char *utf8_buf = NULL, *utf8_end; in file_ascmagic_with_encoding() local 147 if ((utf8_buf = CAST(unsigned char *, emalloc(mlen))) == NULL) { in file_ascmagic_with_encoding() 151 if ((utf8_end = encode_utf8(utf8_buf, mlen, ubuf, ulen)) in file_ascmagic_with_encoding() 154 buffer_init(&bb, b->fd, &b->st, utf8_buf, in file_ascmagic_with_encoding() 155 CAST(size_t, utf8_end - utf8_buf)); in file_ascmagic_with_encoding() 330 if (utf8_buf) in file_ascmagic_with_encoding() 331 efree(utf8_buf); in file_ascmagic_with_encoding()
|
Completed in 16 milliseconds