Skip to content

Commit 95cf66c

Browse files
committed
dep: upgrade libxml2 2.9.12 → 2.9.13
1 parent d37dd02 commit 95cf66c

7 files changed

+2458
-1981
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Nokogiri follows [Semantic Versioning](https://semver.org/), please see the [REA
88

99
### Dependencies
1010

11+
* [CRuby] Vendored libxml2 is updated from 2.9.12 to 2.9.13. This update addresses [CVE-2022-23308](https://gitlab.gnome.org/GNOME/libxml2/-/commit/652dd12). Full changelog is available at https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.13.news
1112
* [CRuby] Vendored libxslt is updated from 1.1.34 to 1.1.35. This update addresses [CVE-2021-30560](https://nvd.nist.gov/vuln/detail/CVE-2021-30560). Full changelog is available at https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.35.news
1213

1314

dependencies.yml

+3-28
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,7 @@
11
libxml2:
2-
version: "2.9.12"
3-
sha256: "c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92"
4-
# manually verified checksum:
5-
#
6-
# $ gpg --verify libxml2-2.9.12.tar.gz.asc ports/archives/libxml2-2.9.12.tar.gz
7-
# gpg: Signature made Thu 13 May 2021 02:59:16 PM EDT
8-
# gpg: using RSA key DB46681BB91ADCEA170FA2D415588B26596BEA5D
9-
# gpg: Good signature from "Daniel Veillard (Red Hat work email) <[email protected]>" [unknown]
10-
# gpg: aka "Daniel Veillard <[email protected]>" [unknown]
11-
# gpg: WARNING: This key is not certified with a trusted signature!
12-
# gpg: There is no indication that the signature belongs to the owner.
13-
# Primary key fingerprint: C744 15BA 7C9C 7F78 F02E 1DC3 4606 B8A5 DE95 BC1F
14-
# Subkey fingerprint: DB46 681B B91A DCEA 170F A2D4 1558 8B26 596B EA5D
15-
#
16-
# using this pgp signature:
17-
#
18-
# -----BEGIN PGP SIGNATURE-----
19-
#
20-
# iQEzBAABCAAdFiEE20ZoG7ka3OoXD6LUFViLJllr6l0FAmCddwQACgkQFViLJllr
21-
# 6l11LQgAioRTdfmcC+uK/7+6HPtF/3c5zkX6j8VGYuvFBwZ0jayqMRBAl++fcpjE
22-
# JUU/JKebSZ/KCYjzyeOWK/i3Gq77iqm3UbZFB85rqu4a5P3gmj/4STWVyAx0KU3z
23-
# G3jKqDhJOt7c0acXb5lh2DngfDa1dn/VGcQcIXsqplNxNr4ET7MnSJjZ3nlxYfW2
24-
# E5vWBdPCMUeXDBl6MjYvw9XnGGBLUAaEJWoFToG6jKmVf4GAd9nza20jj5dtbcJq
25-
# QEOaSDKDr+f9h2NS8haOhJ9vOpy52PdeGzaFlbRkXarGXuAr8kITgATVs8FAqcgv
26-
# MoVhmrO5r2hJf0dCM9fZoYqzpMfmNA==
27-
# =KfJ9
28-
# -----END PGP SIGNATURE-----
29-
#
2+
version: "2.9.13"
3+
sha256: "276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e"
4+
# sha-256 hash provided in https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.13.sha256sum
305

316
libxslt:
327
version: "1.1.35"

ext/nokogiri/extconf.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -770,8 +770,9 @@ def compile
770770
if source_dir
771771
recipe.source_directory = source_dir
772772
else
773+
minor_version = Gem::Version.new(recipe.version).segments.take(2).join(".")
773774
recipe.files = [{
774-
url: "http://xmlsoft.org/sources/#{recipe.name}-#{recipe.version}.tar.gz",
775+
url: "https://download.gnome.org/sources/libxml2/#{minor_version}/#{recipe.name}-#{recipe.version}.tar.xz",
775776
sha256: dependencies["libxml2"]["sha256"],
776777
}]
777778
recipe.patch_files = Dir[File.join(PACKAGE_ROOT_DIR, "patches", "libxml2", "*.patch")].sort

patches/libxml2/0004-use-glibc-strlen.patch

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ diff --git a/xmlstring.c b/xmlstring.c
3131
index e8a1e45d..df247dff 100644
3232
--- a/xmlstring.c
3333
+++ b/xmlstring.c
34-
@@ -423,14 +423,9 @@ xmlStrsub(const xmlChar *str, int start, int len) {
34+
@@ -423,12 +423,7 @@ xmlStrsub(const xmlChar *str, int start, int len) {
3535

3636
int
3737
xmlStrlen(const xmlChar *str) {
38-
- int len = 0;
38+
- size_t len = 0;
3939
-
4040
if (str == NULL) return(0);
4141
- while (*str != 0) { /* non input consuming */
4242
- str++;
4343
- len++;
4444
- }
45-
- return(len);
45+
- return(len > INT_MAX ? 0 : len);
4646
+
4747
+ return strlen((const char*)str);
4848
}

0 commit comments

Comments
 (0)