Commit Graph

301 Commits

Author SHA1 Message Date
Paul Gofman 82d69d8ba9 xmllite: Avoid out of bounds access in readerinput_get_utf8_convlen().
And consequently in readerinput_shrinkraw().

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-15 17:31:33 +02:00
Michael Stefaniuc b0c4d51588 xmllite: Drop superfluous casts to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 09:38:42 +01:00
Michael Stefaniuc c3aa9defbb xmllite: Use a string literal for an empty string.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-04 09:38:40 +01:00
Nikolay Sivov f8182ac19c xmllite/writer: Use wide-char string literals.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 20:28:05 +01:00
Nikolay Sivov 6b5bf48c51 xmllite/reader: Use wide-char string literals.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-18 20:28:05 +01:00
Nikolay Sivov 5066a67835 xmllite/tests: Get rid of strcmp_wa().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-07 21:28:24 +01:00
Jacek Caban 950d960eed xmllite: Update current pointer after reader_skipn call.
The buffer may be reallocated.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:09:36 +01:00
Alexandre Julliard 705d089259 xmllite: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-27 22:20:05 +02:00
Nikolay Sivov 9d4c73f4c1 xmllite/tests: Test complete writer output for UTF-16 case.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-02-13 09:12:16 +01:00
Sven Baars 7f7c703eb9 xmllite/tests: Fix a memory leak (Valgrind).
Signed-off-by: Sven Baars <sven.wine@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-14 17:25:49 +01:00
Nikolay Sivov ea927971f2 xmllite/writer: Simplify single character writes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-02 15:18:02 +01:00
Nikolay Sivov 4c779c07bd xmllite/writer: Implement WriteDocType().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-02 15:18:02 +01:00
Nikolay Sivov b11f43d568 xmllite/writer: Fix writing prefixed attributes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-21 23:58:56 +02:00
Nikolay Sivov 2d5d3a892f xmllite/writer: Fix "xml:space" output.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-17 15:42:17 +02:00
Nikolay Sivov a469d37e43 xmllite/writer: Simplify setting default output encoding.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-14 12:52:45 +02:00
Nikolay Sivov 2564862b51 xmllite/writer: Use internal function to create writer output implicitly.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-14 12:52:43 +02:00
Nikolay Sivov ef7b911a62 xmllite/writer: Fix formatted output with interleaving text nodes.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-14 12:52:42 +02:00
Nikolay Sivov 9784ef1633 xmllite/writer: Fix formatted output for closing tags.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-14 12:52:40 +02:00
Nikolay Sivov 5f548d2af3 xmllite/writer: Free finished element data (Valgrind).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-14 12:52:38 +02:00
Nikolay Sivov 1517695f78 xmllite/writer: Improve namespace support in WriteAttributeString().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-12 23:15:14 +02:00
Nikolay Sivov 9730971e8e xmllite/tests: Add another test for WriteAttributeString().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-12 23:15:14 +02:00
Nikolay Sivov a86e2a4a3f xmllite/writer: Improve namespaces handling in WriteStartElement().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-11 13:38:16 +02:00
Nikolay Sivov 8eb054f328 xmllite/writer: Add support for namespace definitions in WriteElementString().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-11 13:38:15 +02:00
Nikolay Sivov b34362f2d9 xmllite/writer: Validate local name and prefix in WriteStartElement().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-10 16:45:03 +02:00
Nikolay Sivov 69b2ed368d xmllite/writer: Validate local name and prefix in WriteElementString().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-10 16:45:01 +02:00
Nikolay Sivov 5e5b7b49ba xmllite/tests: Add more writer tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-10 16:44:59 +02:00
Nikolay Sivov fc62dac4dc xmllite/reader: Fix compiler warning.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-05 19:05:51 +02:00
Jacek Caban 5f11c441e0 xmllite: Prefer builtin version.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-05 17:00:15 +02:00
Michael Stefaniuc 962b31c80b include: Add a generic available ARRAY_SIZE().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-04 10:39:15 +02:00
Michael Stefaniuc 7b5668a6e7 include: Make ARRAY_SIZE() available in wine/test.h.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-25 12:09:17 +02:00
Nikolay Sivov 4eedecfc61 xmllite/tests: Use ARRAY_SIZE() macro in tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-22 09:43:17 +01:00
Nikolay Sivov 4a78b4da41 xmllite: Use ARRAY_SIZE macro for reader too.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-22 09:43:13 +01:00
Michael Stefaniuc c9f1ada8e5 xmllite: Use the global HeapAlloc() wrappers.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-08 21:09:10 +01:00
Nikolay Sivov f826b25019 xmllite/tests: Use the global HeapAlloc() wrappers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-08 13:11:10 +01:00
Nikolay Sivov b077271cfb xmllite/tests: Fix clang warning.
Reported by Gerald Pfeifer.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-06 12:15:28 +01:00
Nikolay Sivov 4b6d8fb063 xmllite/tests: Added a test for output with code page 1200.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-03 11:50:51 +02:00
Nikolay Sivov 49a57bcaba xmllite/writer: Improve handling of the output with invalid encoding.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-03 11:50:49 +02:00
Nikolay Sivov a6d6bebede xmllite/writer: Do not indent after just BOM has been written.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 09:45:12 +02:00
Nikolay Sivov 5773a5d3b4 xmllite/writer: Fix indentation on WriteElementString().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 09:45:10 +02:00
Nikolay Sivov 5f4ed88ee8 xmllite/writer: Fix empty element and state handling in WriteElementString().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 09:45:08 +02:00
Nikolay Sivov b06dd7d804 xmllite/reader: Added a helper for setting current attribute cursor.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-21 14:59:54 +02:00
Nikolay Sivov be5679108c xmllite/reader: Implement MoveToAttributeByName().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-21 14:59:51 +02:00
Nikolay Sivov b1e0f75972 xmllite/tests: Use input stream helper in more tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-20 18:55:17 +02:00
Nikolay Sivov 707ab559e5 xmllite/writer: Fix IID argument handling in CreateXmlWriter().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-11 14:59:33 +02:00
Nikolay Sivov d1e14576bb xmllite/reader: Fix IID argument handling in CreateXmlReader().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-11 14:59:29 +02:00
Jacek Caban afaec19469 xmllite/tests: Use reader_value helper in one more place (Coverity).
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-04 16:33:24 +02:00
Nikolay Sivov a68e51ce63 xmllite/writer: Preserve original encoding name spelling in writer output.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-03 10:52:41 +02:00
Nikolay Sivov ef023c3fd6 xmllite: Recognize us-ascii encoding.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-03 10:52:39 +02:00
Jacek Caban 9506e7da5e xmllite: Return local name stored in namespace for prefixed namespace attribute values.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-31 19:13:34 +02:00
Jacek Caban 1b9b791c41 xmllite: Allocate value in reader_add_attr.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-31 19:13:30 +02:00