/[packages]/updates/8/expat/current/SOURCES/CVE-2022-25236-5.patch
ViewVC logotype

Contents of /updates/8/expat/current/SOURCES/CVE-2022-25236-5.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1790357 - (show annotations) (download)
Fri Mar 11 09:19:06 2022 UTC (14 months, 4 weeks ago) by ns80
File size: 1278 byte(s)
- add patches from Ubuntu to fix regressions introduced by security fixes (mga#30145)

1 From e0f852db1e3b1e6d34922c68a653c3cc4b85361c Mon Sep 17 00:00:00 2001
2 From: Sebastian Pipping <sebastian@pipping.org>
3 Date: Thu, 3 Mar 2022 17:29:54 +0100
4 Subject: [PATCH] tests: Cover relaxed fix to CVE-2022-25236
5
6 ---
7 expat/tests/runtests.c | 8 +++++---
8 1 file changed, 5 insertions(+), 3 deletions(-)
9
10 --- a/tests/runtests.c
11 +++ b/tests/runtests.c
12 @@ -7460,16 +7460,18 @@ START_TEST(test_ns_separator_in_uri) {
13 struct test_case {
14 enum XML_Status expectedStatus;
15 const char *doc;
16 + XML_Char namesep;
17 };
18 struct test_case cases[] = {
19 - {XML_STATUS_OK, "<doc xmlns='one_two' />"},
20 - {XML_STATUS_ERROR, "<doc xmlns='one&#x0A;two' />"},
21 + {XML_STATUS_OK, "<doc xmlns='one_two' />", XCS('\n')},
22 + {XML_STATUS_ERROR, "<doc xmlns='one&#x0A;two' />", XCS('\n')},
23 + {XML_STATUS_OK, "<doc xmlns='one:two' />", XCS(':')},
24 };
25
26 size_t i = 0;
27 size_t failCount = 0;
28 for (; i < sizeof(cases) / sizeof(cases[0]); i++) {
29 - XML_Parser parser = XML_ParserCreateNS(NULL, '\n');
30 + XML_Parser parser = XML_ParserCreateNS(NULL, cases[i].namesep);
31 XML_SetElementHandler(parser, dummy_start_element, dummy_end_element);
32 if (XML_Parse(parser, cases[i].doc, (int)strlen(cases[i].doc),
33 /*isFinal*/ XML_TRUE)

  ViewVC Help
Powered by ViewVC 1.1.28