diff options
| author | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
|---|---|---|
| committer | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
| commit | ecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch) | |
| tree | b89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-ruby/tidy-ext | |
| parent | 1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff) | |
| download | srcux-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz srcux-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz srcux-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip | |
Updating liguros repo
Diffstat (limited to 'dev-ruby/tidy-ext')
| -rw-r--r-- | dev-ruby/tidy-ext/Manifest | 1 | ||||
| -rw-r--r-- | dev-ruby/tidy-ext/files/11CVE-2015-5522.patch | 34 | ||||
| -rw-r--r-- | dev-ruby/tidy-ext/metadata.xml | 12 | ||||
| -rw-r--r-- | dev-ruby/tidy-ext/tidy-ext-0.1.14-r3.ebuild | 40 |
4 files changed, 87 insertions, 0 deletions
diff --git a/dev-ruby/tidy-ext/Manifest b/dev-ruby/tidy-ext/Manifest new file mode 100644 index 000000000000..adca93b6a591 --- /dev/null +++ b/dev-ruby/tidy-ext/Manifest @@ -0,0 +1 @@ +DIST tidy-ext-0.1.14.gem 260608 BLAKE2B 5401ec2019f25307f4083f3a1717cd2b0419e0025875b0ad461c72e50445f9b1ffc488a723db04432d262cf2dd94fd267f5261b33eb53d829f4a03d5cd29ab30 SHA512 8a8eada3cb5e815338de49332a24c85b9b2cabba0e10f2d72fe85bd4faf76924e52d82066e7b73e62bc459631aaa9d1c42a6941988ae2a71ca0ddd4f3302ad86 diff --git a/dev-ruby/tidy-ext/files/11CVE-2015-5522.patch b/dev-ruby/tidy-ext/files/11CVE-2015-5522.patch new file mode 100644 index 000000000000..942209873be0 --- /dev/null +++ b/dev-ruby/tidy-ext/files/11CVE-2015-5522.patch @@ -0,0 +1,34 @@ +From c18f27a58792f7fbd0b30a0ff50d6b40a82f940d Mon Sep 17 00:00:00 2001 +From: Geoff McLane <ubuntu@geoffair.info> +Date: Wed, 3 Jun 2015 20:26:03 +0200 +Subject: [PATCH] Issue #217 - avoid len going negative, ever... + +--- + src/lexer.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/lexer.c b/src/lexer.c +index 376a3d8..664f806 100644 +--- a/ext/tidy/lexer.c ++++ b/ext/tidy/lexer.c +@@ -3739,16 +3740,17 @@ static tmbstr ParseValue( TidyDocImpl* doc, ctmbstr name, + /* and prompts attributes unless --literal-attributes is set to yes */ + /* #994841 - Whitespace is removed from value attributes */ + +- if (munge && ++ /* Issue #217 - Also only if/while (len > 0) - MUST NEVER GO NEGATIVE! */ ++ if ((len > 0) && munge && + TY_(tmbstrcasecmp)(name, "alt") && + TY_(tmbstrcasecmp)(name, "title") && + TY_(tmbstrcasecmp)(name, "value") && + TY_(tmbstrcasecmp)(name, "prompt")) + { +- while (TY_(IsWhite)(lexer->lexbuf[start+len-1])) ++ while (TY_(IsWhite)(lexer->lexbuf[start+len-1]) && (len > 0)) + --len; + +- while (TY_(IsWhite)(lexer->lexbuf[start]) && start < len) ++ while (TY_(IsWhite)(lexer->lexbuf[start]) && (start < len) && (len > 0)) + { + ++start; + --len; diff --git a/dev-ruby/tidy-ext/metadata.xml b/dev-ruby/tidy-ext/metadata.xml new file mode 100644 index 000000000000..d38c8e949155 --- /dev/null +++ b/dev-ruby/tidy-ext/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>ruby@gentoo.org</email> + <name>Gentoo Ruby Project</name> + </maintainer> + <upstream> + <remote-id type="github">carld/tidy</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/dev-ruby/tidy-ext/tidy-ext-0.1.14-r3.ebuild b/dev-ruby/tidy-ext/tidy-ext-0.1.14-r3.ebuild new file mode 100644 index 000000000000..f2ea49a8091e --- /dev/null +++ b/dev-ruby/tidy-ext/tidy-ext-0.1.14-r3.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +USE_RUBY="ruby24 ruby25 ruby26 ruby27" + +RUBY_FAKEGEM_DOCDIR="rdoc" + +RUBY_FAKEGEM_RECIPE_TEST="rspec" + +inherit ruby-fakegem eutils + +DESCRIPTION="W3C HTML Tidy library implemented as a Ruby extension" +HOMEPAGE="https://github.com/carld/tidy" + +LICENSE="HTML-Tidy" +SLOT="0" +KEYWORDS="~alpha amd64 arm ~arm64 ~hppa ppc ppc64 ~sparc x86" +IUSE="" + +RUBY_PATCHES=( 11CVE-2015-5522.patch ) + +all_ruby_prepare() { + mkdir lib || die + + # Remove reference to rspec 1 + sed -i -e '/spec/d' spec/spec_helper.rb || die + + # Avoid spec that needs network connectivity. + rm spec/tidy/remote_uri_spec.rb || die +} + +each_ruby_configure() { + ${RUBY} -Cext/tidy extconf.rb || die "Unable to configure extension." +} + +each_ruby_compile() { + emake -Cext/tidy V=1 + cp ext/tidy/tidy$(get_modname) lib/ || die "Unable to copy extension." +} |
