!20 Upgrade verison to 5.8.0
From: @cherry530 Reviewed-by: @wang--ge Signed-off-by: @wang--ge
This commit is contained in:
commit
2772e23533
@ -1,40 +0,0 @@
|
||||
From 4377ab84a4a2748d72be91d26210567cc933c760 Mon Sep 17 00:00:00 2001
|
||||
From: lutianxiong <lutianxiong@huawei.com>
|
||||
Date: Sat, 20 Jun 2020 09:19:17 +0800
|
||||
Subject: [PATCH 095/109] fix memleak in GetTokenFromStream
|
||||
|
||||
check asp & php if ParseAttribute return NULL
|
||||
---
|
||||
src/lexer.c | 16 ++++++++++++++++
|
||||
1 file changed, 16 insertions(+)
|
||||
|
||||
diff --git a/src/lexer.c b/src/lexer.c
|
||||
index ca66aee..bbc1e15 100644
|
||||
--- a/src/lexer.c
|
||||
+++ b/src/lexer.c
|
||||
@@ -3263,6 +3263,22 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode )
|
||||
|
||||
if (!name)
|
||||
{
|
||||
+ /* check if attributes are created by ASP markup */
|
||||
+ if (asp)
|
||||
+ {
|
||||
+ av = TY_(NewAttribute)(doc);
|
||||
+ av->asp = asp;
|
||||
+ AddAttrToList( &attributes, av );
|
||||
+ }
|
||||
+
|
||||
+ /* check if attributes are created by PHP markup */
|
||||
+ if (php)
|
||||
+ {
|
||||
+ av = TY_(NewAttribute)(doc);
|
||||
+ av->php = php;
|
||||
+ AddAttrToList( &attributes, av );
|
||||
+ }
|
||||
+
|
||||
/* fix for http://tidy.sf.net/bug/788031 */
|
||||
lexer->lexsize -= 1;
|
||||
lexer->txtend = lexer->txtstart;
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@ -1,27 +0,0 @@
|
||||
From 8f0e7aa22a854add9e6082ca5136e82f032a236a Mon Sep 17 00:00:00 2001
|
||||
From: lutianxiong <lutianxiong@huawei.com>
|
||||
Date: Sun, 22 Nov 2020 00:10:12 +0800
|
||||
Subject: [PATCH] Free attributes before return NULL (#899)
|
||||
|
||||
---
|
||||
src/lexer.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/lexer.c b/src/lexer.c
|
||||
index 49b74f5..16a8fef 100644
|
||||
--- a/src/lexer.c
|
||||
+++ b/src/lexer.c
|
||||
@@ -3469,6 +3469,10 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode )
|
||||
return node; /* the COMMENT token */
|
||||
}
|
||||
|
||||
+ /* check attributes before return NULL */
|
||||
+ if (attributes)
|
||||
+ TY_(FreeAttribute)( doc, attributes );
|
||||
+
|
||||
DEBUG_LOG(SPRTF("Returning NULL...\n"));
|
||||
return NULL;
|
||||
}
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
Binary file not shown.
BIN
tidy-html5-5.8.0.tar.gz
Normal file
BIN
tidy-html5-5.8.0.tar.gz
Normal file
Binary file not shown.
10
tidy.spec
10
tidy.spec
@ -2,15 +2,12 @@
|
||||
%global upname tidy-html5
|
||||
|
||||
Name: tidy
|
||||
Version: 5.7.28
|
||||
Version: 5.8.0
|
||||
Release: 1
|
||||
Summary: Utility to clean up and pretty print HTML/XHTML/XML
|
||||
License: W3C
|
||||
URL: http://www.html-tidy.org/
|
||||
Source0: https://github.com/htacg/%{upname}/archive/%{version}.tar.gz#/%{upname}-%{version}.tar.gz
|
||||
|
||||
Patch0: fix-memleak-in-GetTokenFromStream.patch
|
||||
Patch1: free-attributes-before-return-NULL.patch
|
||||
Source0: https://github.com/htacg/%{upname}/archive/%{version}/%{upname}-%{version}.tar.gz
|
||||
|
||||
BuildRequires: gcc-c++ cmake gcc libxslt pkgconfig
|
||||
Provides: tidy-html5 = %{version}-%{release}
|
||||
@ -81,6 +78,9 @@ ln -s tidyplatform.h $RPM_BUILD_ROOT%{_includedir}/platform.h
|
||||
%{_mandir}/*
|
||||
|
||||
%changelog
|
||||
* Tue Oct 17 2023 xu_ping <707078654@qq.com> - 5.8.0-1
|
||||
- Update to version 5.8.0
|
||||
|
||||
* Tue Jan 26 2021 fuanan <fuanan3@huawei.com> - 5.7.28-1
|
||||
- Update to version 5.7.28
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user