From: David Kahurani k.kahurani@gmail.com
attr->value should not be freed as it was not allocated attr->localname should instead having just being previously allocated and not freed anywhere else
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/xmllite/reader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/xmllite/reader.c b/dlls/xmllite/reader.c index 4045b4dfcca..d99f121e0cb 100644 --- a/dlls/xmllite/reader.c +++ b/dlls/xmllite/reader.c @@ -424,7 +424,7 @@ static HRESULT reader_add_attr(xmlreader *reader, strval *prefix, strval *localn { hr = reader_strvaldup(reader, value, &attr->value); if (hr != S_OK) - reader_free_strvalued(reader, &attr->value); + reader_free_strvalued(reader, &attr->localname); } if (hr != S_OK) {
From: David Kahurani k.kahurani@gmail.com
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/xmllite/writer.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index 58d9edea059..c2766a21ed5 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -180,6 +180,13 @@ static struct element *alloc_element(xmlwriter *writer, const WCHAR *prefix, con len += lstrlenW(local);
ret->qname = writer_alloc(writer, (len + 1)*sizeof(WCHAR)); + + if (!ret->qname) + { + writer_free(writer, ret); + return NULL; + } + ret->len = len; if (prefix) { @@ -249,7 +256,8 @@ static WCHAR *writer_strndupW(const xmlwriter *writer, const WCHAR *str, int len
size = (len + 1) * sizeof(WCHAR); ret = writer_alloc(writer, size); - memcpy(ret, str, size); + if (ret) memcpy(ret, str, size); + return ret; }
@@ -941,6 +949,7 @@ static HRESULT WINAPI xmlwriter_WriteAttributeString(IXmlWriter *iface, LPCWSTR return S_OK; }
+ //TODO /* Ignore prefix is URI wasn't specified. */ if (is_xmlns_local && is_empty_string(uri)) {
From: David Kahurani k.kahurani@gmail.com
Signed-off-by: David Kahurani k.kahurani@gmail.com --- dlls/xmllite/writer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/xmllite/writer.c b/dlls/xmllite/writer.c index c2766a21ed5..dead9864565 100644 --- a/dlls/xmllite/writer.c +++ b/dlls/xmllite/writer.c @@ -950,7 +950,7 @@ static HRESULT WINAPI xmlwriter_WriteAttributeString(IXmlWriter *iface, LPCWSTR }
//TODO - /* Ignore prefix is URI wasn't specified. */ + /* Ignore prefix if URI wasn't specified. */ if (is_xmlns_local && is_empty_string(uri)) { write_output_attribute(This, NULL, 0, L"xmlns", 5, value);