Skip to content

Commit 029684c

Browse files
committed
Add nullptr check conditions
1 parent 3e95614 commit 029684c

File tree

1 file changed

+7
-4
lines changed
  • src/request_body_processor

1 file changed

+7
-4
lines changed

src/request_body_processor/xml.cc

+7-4
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,13 @@ bool XML::processChunk(const char *buf, unsigned int size,
268268
}
269269

270270
if (m_data.parsing_ctx_arg != NULL &&
271-
m_transaction->m_secXMLParseXmlIntoArgs
272-
== RulesSetProperties::OnlyArgsConfigXMLParseXmlIntoArgs ||
273-
m_transaction->m_secXMLParseXmlIntoArgs
274-
== RulesSetProperties::TrueConfigXMLParseXmlIntoArgs) {
271+
(
272+
m_transaction->m_secXMLParseXmlIntoArgs
273+
== RulesSetProperties::OnlyArgsConfigXMLParseXmlIntoArgs
274+
||
275+
m_transaction->m_secXMLParseXmlIntoArgs
276+
== RulesSetProperties::TrueConfigXMLParseXmlIntoArgs)
277+
) {
275278
xmlSetGenericErrorFunc(m_data.parsing_ctx_arg, null_error);
276279
xmlParseChunk(m_data.parsing_ctx_arg, buf, size, 0);
277280
if (m_data.parsing_ctx_arg->wellFormed != 1) {

0 commit comments

Comments
 (0)