@@ -254,7 +254,8 @@ bool XML::processChunk(const char *buf, unsigned int size,
254
254
}
255
255
256
256
/* Not a first invocation. */
257
- if (m_transaction->m_secXMLParseXmlIntoArgs
257
+ if (m_data.parsing_ctx != NULL &&
258
+ m_transaction->m_secXMLParseXmlIntoArgs
258
259
!= RulesSetProperties::OnlyArgsConfigXMLParseXmlIntoArgs) {
259
260
xmlSetGenericErrorFunc (m_data.parsing_ctx , null_error);
260
261
xmlParseChunk (m_data.parsing_ctx , buf, size, 0 );
@@ -266,7 +267,8 @@ bool XML::processChunk(const char *buf, unsigned int size,
266
267
}
267
268
}
268
269
269
- if (m_transaction->m_secXMLParseXmlIntoArgs
270
+ if (m_data.parsing_ctx_arg != NULL &&
271
+ m_transaction->m_secXMLParseXmlIntoArgs
270
272
== RulesSetProperties::OnlyArgsConfigXMLParseXmlIntoArgs ||
271
273
m_transaction->m_secXMLParseXmlIntoArgs
272
274
== RulesSetProperties::TrueConfigXMLParseXmlIntoArgs) {
@@ -286,7 +288,8 @@ bool XML::processChunk(const char *buf, unsigned int size,
286
288
bool XML::complete (std::string *error) {
287
289
/* Only if we have a context, meaning we've done some work. */
288
290
if (m_data.parsing_ctx != NULL || m_data.parsing_ctx_arg != NULL ) {
289
- if (m_transaction->m_secXMLParseXmlIntoArgs
291
+ if (m_data.parsing_ctx != NULL &&
292
+ m_transaction->m_secXMLParseXmlIntoArgs
290
293
!= RulesSetProperties::OnlyArgsConfigXMLParseXmlIntoArgs) {
291
294
/* This is how we signalise the end of parsing to libxml. */
292
295
xmlParseChunk (m_data.parsing_ctx , NULL , 0 , 1 );
@@ -307,10 +310,14 @@ bool XML::complete(std::string *error) {
307
310
return false ;
308
311
}
309
312
}
310
- if (m_transaction->m_secXMLParseXmlIntoArgs
311
- == RulesSetProperties::OnlyArgsConfigXMLParseXmlIntoArgs ||
312
- m_transaction->m_secXMLParseXmlIntoArgs
313
- == RulesSetProperties::TrueConfigXMLParseXmlIntoArgs) {
313
+ if (m_data.parsing_ctx_arg != NULL &&
314
+ (
315
+ m_transaction->m_secXMLParseXmlIntoArgs
316
+ == RulesSetProperties::OnlyArgsConfigXMLParseXmlIntoArgs
317
+ ||
318
+ m_transaction->m_secXMLParseXmlIntoArgs
319
+ == RulesSetProperties::TrueConfigXMLParseXmlIntoArgs)
320
+ ) {
314
321
/* This is how we signalise the end of parsing to libxml. */
315
322
if (xmlParseChunk (m_data.parsing_ctx_arg , NULL , 0 , 1 ) != 0 ) {
316
323
if (m_data.xml_error != " " ) {
0 commit comments