php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76992 Tidy causes SIGSEGV crash
Submitted: 2018-10-10 13:12 UTC Modified: 2018-10-15 13:09 UTC
From: xflopin at gmail dot com Assigned: cmb (profile)
Status: Not a bug Package: Tidy (PECL)
PHP Version: 7.1.22 OS: Linux
Private report: No CVE-ID: None
 [2018-10-10 13:12 UTC] xflopin at gmail dot com
Description:
------------
The following simple code causes php process to crash (SIGSEGV) - both in cli and fpm.

Actually tested on PHP 7.1.17 an PHP 5.6.33. I am unable to get newer one.

Test script:
---------------
$config = array(
	'word-2000'=>true,
);
$tidy = new Tidy();
$tidy->parseString('<html xmlns:o=""><div class="">', $config);
$tidy->cleanRepair();



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-10-10 22:28 UTC] cmb@php.net
I can confirm the segfault with current PHP master using libtidy
5.2.0-2 (Debian Stretch) aka. 2016/04/07.  If the class attribute
is not empty, no segfault occurs for me, so this might be caused
by tidy-html5 issue 591[1], which is resolved as of libtidy 5.6.0.

[1] <https://github.com/htacg/tidy-html5/issues/591>
 [2018-10-15 13:09 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2018-10-15 13:09 UTC] cmb@php.net
I have verified that libtidy 5.4.0 causes a segfault, but 5.6.0
does not, so this is a resolved upstream issue.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 07:01:31 2024 UTC