Skip to content

Commit

Permalink
8332539: Update libxml2 to 2.12.7
Browse files Browse the repository at this point in the history
Reviewed-by: kcr, sykora
  • Loading branch information
Hima Bindu Meda committed May 28, 2024
1 parent 31fe622 commit dedcf1d
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 41 deletions.
2 changes: 1 addition & 1 deletion modules/javafx.web/src/main/legal/libxml2.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## xmlsoft.org: libxml2 v2.12.6
## xmlsoft.org: libxml2 v2.12.7

### libxml2 License
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
#define PACKAGE_NAME "libxml2"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libxml2 2.12.6"
#define PACKAGE_STRING "libxml2 2.12.7"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libxml2"
Expand All @@ -145,7 +145,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "2.12.6"
#define PACKAGE_VERSION "2.12.7"

/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
Expand All @@ -159,7 +159,7 @@
#define VA_LIST_IS_ARRAY 1

/* Version number of package */
#define VERSION "2.12.6"
#define VERSION "2.12.7"

/* Determine what socket length (socklen_t) data type is */
#define XML_SOCKLEN_T socklen_t
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ XMLPUBFUN void xmlCheckVersion(int version);
*
* the version string like "1.2.3"
*/
#define LIBXML_DOTTED_VERSION "2.12.6"
#define LIBXML_DOTTED_VERSION "2.12.7"

/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 10203
*/
#define LIBXML_VERSION 21206
#define LIBXML_VERSION 21207

/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "10203"
*/
#define LIBXML_VERSION_STRING "21206"
#define LIBXML_VERSION_STRING "21207"

/**
* LIBXML_VERSION_EXTRA:
Expand All @@ -58,7 +58,7 @@ XMLPUBFUN void xmlCheckVersion(int version);
* Macro to check that the libxml version in use is compatible with
* the version the software has been compiled against
*/
#define LIBXML_TEST_VERSION xmlCheckVersion(21206);
#define LIBXML_TEST_VERSION xmlCheckVersion(21207);

#ifndef VMS
#if 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
#define PACKAGE_NAME "libxml2"

/* Define to the full name and version of this package. */
#define PACKAGE_STRING "libxml2 2.12.6"
#define PACKAGE_STRING "libxml2 2.12.7"

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "libxml2"
Expand All @@ -145,7 +145,7 @@
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION "2.12.6"
#define PACKAGE_VERSION "2.12.7"

/* Define to 1 if all of the C90 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
Expand All @@ -159,7 +159,7 @@
#define VA_LIST_IS_ARRAY 1

/* Version number of package */
#define VERSION "2.12.6"
#define VERSION "2.12.7"

/* Determine what socket length (socklen_t) data type is */
#define XML_SOCKLEN_T socklen_t
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ XMLPUBFUN void xmlCheckVersion(int version);
*
* the version string like "1.2.3"
*/
#define LIBXML_DOTTED_VERSION "2.12.6"
#define LIBXML_DOTTED_VERSION "2.12.7"

/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 10203
*/
#define LIBXML_VERSION 21206
#define LIBXML_VERSION 21207

/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "10203"
*/
#define LIBXML_VERSION_STRING "21206"
#define LIBXML_VERSION_STRING "21207"

/**
* LIBXML_VERSION_EXTRA:
Expand All @@ -58,7 +58,7 @@ XMLPUBFUN void xmlCheckVersion(int version);
* Macro to check that the libxml version in use is compatible with
* the version the software has been compiled against
*/
#define LIBXML_TEST_VERSION xmlCheckVersion(21206);
#define LIBXML_TEST_VERSION xmlCheckVersion(21207);

#ifndef VMS
#if 0
Expand Down Expand Up @@ -248,9 +248,9 @@ XMLPUBFUN void xmlCheckVersion(int version);
#endif

/**
* LIBXML_XINCLUDE_ENABLED:
* LIBXML_XPTR_LOCS_ENABLED:
*
* Whether XInclude is configured in
* Whether support for XPointer locations is configured in
*/
#if 0
#define LIBXML_XPTR_LOCS_ENABLED
Expand Down Expand Up @@ -313,7 +313,7 @@ XMLPUBFUN void xmlCheckVersion(int version);
/**
* LIBXML_DEBUG_RUNTIME:
*
* Whether the runtime debugging is configured in
* Removed
*/
#if 0
#define LIBXML_DEBUG_RUNTIME
Expand Down Expand Up @@ -409,12 +409,7 @@ XMLPUBFUN void xmlCheckVersion(int version);
#endif

#ifdef __GNUC__

/**
* ATTRIBUTE_UNUSED:
*
* Macro used to signal to GCC unused function parameters
*/
/** DOC_DISABLE */

#ifndef ATTRIBUTE_UNUSED
# if ((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 7)))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
NEWS file for libxml2

v2.12.7: May 13 2024

### Security

- [CVE-2024-34459] Fix buffer overread with `xmllint --htmlout`

### Regressions

- xmllint: Fix --pedantic option
- save: Handle invalid parent pointers in xhtmlNodeDumpOutput


v2.12.6: Mar 15 2024

### Regressions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AC_PREREQ([2.63])

m4_define([MAJOR_VERSION], 2)
m4_define([MINOR_VERSION], 12)
m4_define([MICRO_VERSION], 6)
m4_define([MICRO_VERSION], 7)

AC_INIT([libxml2],[MAJOR_VERSION.MINOR_VERSION.MICRO_VERSION])
AC_CONFIG_SRCDIR([entities.c])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1391,13 +1391,14 @@ xhtmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
static void
xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
int format = ctxt->format, addmeta;
xmlNodePtr tmp, root, unformattedNode = NULL;
xmlNodePtr tmp, root, unformattedNode = NULL, parent;
xmlChar *start, *end;
xmlOutputBufferPtr buf = ctxt->buf;

if (cur == NULL) return;

root = cur;
parent = cur->parent;
while (1) {
switch (cur->type) {
case XML_DOCUMENT_NODE:
Expand All @@ -1414,7 +1415,9 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
break;

case XML_DOCUMENT_FRAG_NODE:
if (cur->children) {
/* Always validate cur->parent when descending. */
if ((cur->parent == parent) && (cur->children != NULL)) {
parent = cur;
cur = cur->children;
continue;
}
Expand All @@ -1441,6 +1444,16 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
ctxt->indent_nr : ctxt->level),
ctxt->indent);

/*
* Some users like lxml are known to pass nodes with a corrupted
* tree structure. Fall back to a recursive call to handle this
* case.
*/
if ((cur->parent != parent) && (cur->children != NULL)) {
xhtmlNodeDumpOutput(ctxt, cur);
break;
}

xmlOutputBufferWrite(buf, 1, "<");
if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
Expand All @@ -1461,10 +1474,10 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
if (cur->properties != NULL)
xhtmlAttrListDumpOutput(ctxt, cur->properties);

if ((cur->parent != NULL) &&
(cur->parent->parent == (xmlNodePtr) cur->doc) &&
if ((parent != NULL) &&
(parent->parent == (xmlNodePtr) cur->doc) &&
xmlStrEqual(cur->name, BAD_CAST"head") &&
xmlStrEqual(cur->parent->name, BAD_CAST"html")) {
xmlStrEqual(parent->name, BAD_CAST"html")) {

tmp = cur->children;
while (tmp != NULL) {
Expand Down Expand Up @@ -1570,6 +1583,7 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {

if (ctxt->format == 1) xmlOutputBufferWrite(buf, 1, "\n");
if (ctxt->level >= 0) ctxt->level++;
parent = cur;
cur = cur->children;
continue;
}
Expand Down Expand Up @@ -1664,13 +1678,9 @@ xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
break;
}

/*
* The parent should never be NULL here but we want to handle
* corrupted documents gracefully.
*/
if (cur->parent == NULL)
return;
cur = cur->parent;
cur = parent;
/* cur->parent was validated when descending. */
parent = cur->parent;

if (cur->type == XML_ELEMENT_NODE) {
if (ctxt->level > 0) ctxt->level--;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ XMLPUBFUN void xmlCheckVersion(int version);
*
* the version string like "1.2.3"
*/
#define LIBXML_DOTTED_VERSION "2.12.6"
#define LIBXML_DOTTED_VERSION "2.12.7"

/**
* LIBXML_VERSION:
*
* the version number: 1.2.3 value is 10203
*/
#define LIBXML_VERSION 21206
#define LIBXML_VERSION 21207

/**
* LIBXML_VERSION_STRING:
*
* the version number string, 1.2.3 value is "10203"
*/
#define LIBXML_VERSION_STRING "21206"
#define LIBXML_VERSION_STRING "21207"

/**
* LIBXML_VERSION_EXTRA:
Expand All @@ -58,7 +58,7 @@ XMLPUBFUN void xmlCheckVersion(int version);
* Macro to check that the libxml version in use is compatible with
* the version the software has been compiled against
*/
#define LIBXML_TEST_VERSION xmlCheckVersion(21206);
#define LIBXML_TEST_VERSION xmlCheckVersion(21207);

#ifndef VMS
#if 0
Expand Down

9 comments on commit dedcf1d

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johanvos
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/skara tag 23+20

@openjdk
Copy link

@openjdk openjdk bot commented on dedcf1d May 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johanvos The tag 23+20 was successfully created.

@HimaBinduMeda
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jfx22u

@openjdk
Copy link

@openjdk openjdk bot commented on dedcf1d May 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HimaBinduMeda the backport was successfully created on the branch backport-HimaBinduMeda-dedcf1d2 in my personal fork of openjdk/jfx22u. To create a pull request with this backport targeting openjdk/jfx22u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit dedcf1d2 from the openjdk/jfx repository.

The commit being backported was authored by Hima Bindu Meda on 28 May 2024 and was reviewed by Kevin Rushforth and Joeri Sykora.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jfx22u:

$ git fetch https://github.com/openjdk-bots/jfx22u.git backport-HimaBinduMeda-dedcf1d2:backport-HimaBinduMeda-dedcf1d2
$ git checkout backport-HimaBinduMeda-dedcf1d2
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jfx22u.git backport-HimaBinduMeda-dedcf1d2

@johanvos
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jfx17u

@johanvos
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jfx21u

@openjdk
Copy link

@openjdk openjdk bot commented on dedcf1d Jun 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johanvos the backport was successfully created on the branch backport-johanvos-dedcf1d2-master in my personal fork of openjdk/jfx21u. To create a pull request with this backport targeting openjdk/jfx21u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit dedcf1d2 from the openjdk/jfx repository.

The commit being backported was authored by Hima Bindu Meda on 28 May 2024 and was reviewed by Kevin Rushforth and Joeri Sykora.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jfx21u:

$ git fetch https://github.com/openjdk-bots/jfx21u.git backport-johanvos-dedcf1d2-master:backport-johanvos-dedcf1d2-master
$ git checkout backport-johanvos-dedcf1d2-master
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jfx21u.git backport-johanvos-dedcf1d2-master

@openjdk
Copy link

@openjdk openjdk bot commented on dedcf1d Jun 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@johanvos the backport was successfully created on the branch backport-johanvos-dedcf1d2-master in my personal fork of openjdk/jfx17u. To create a pull request with this backport targeting openjdk/jfx17u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit dedcf1d2 from the openjdk/jfx repository.

The commit being backported was authored by Hima Bindu Meda on 28 May 2024 and was reviewed by Kevin Rushforth and Joeri Sykora.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jfx17u:

$ git fetch https://github.com/openjdk-bots/jfx17u.git backport-johanvos-dedcf1d2-master:backport-johanvos-dedcf1d2-master
$ git checkout backport-johanvos-dedcf1d2-master
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jfx17u.git backport-johanvos-dedcf1d2-master

Please sign in to comment.