diff options
author | robot-contrib <[email protected]> | 2025-05-14 06:53:03 +0300 |
---|---|---|
committer | robot-contrib <[email protected]> | 2025-05-14 07:05:42 +0300 |
commit | 286dbc77293811055ff4f9303cd376eff9e50104 (patch) | |
tree | a50eea3eb2b824c7c68e15b4cc3e127731776d32 /contrib/restricted/aws/aws-c-common/source/xml_parser.c | |
parent | 0bf9db6399352012396e7791bcfd762e944b33c2 (diff) |
Update contrib/restricted/aws/aws-c-common to 0.12.2
commit_hash:fc6e67f9b12b0b888c90bb97bf2b1cbfcd74a044
Diffstat (limited to 'contrib/restricted/aws/aws-c-common/source/xml_parser.c')
-rw-r--r-- | contrib/restricted/aws/aws-c-common/source/xml_parser.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/restricted/aws/aws-c-common/source/xml_parser.c b/contrib/restricted/aws/aws-c-common/source/xml_parser.c index e1b5807401d..7675bff3017 100644 --- a/contrib/restricted/aws/aws-c-common/source/xml_parser.c +++ b/contrib/restricted/aws/aws-c-common/source/xml_parser.c @@ -40,6 +40,8 @@ static int s_load_node_decl( AWS_PRECONDITION(decl_body); AWS_PRECONDITION(node); + node->is_empty = decl_body->ptr[decl_body->len - 1] == '/'; + struct aws_array_list splits; AWS_ZERO_STRUCT(splits); @@ -158,6 +160,14 @@ int s_advance_to_closing_tag( AWS_PRECONDITION(parser); AWS_PRECONDITION(node); + if (node->is_empty) { + if (out_body) { + out_body->ptr = NULL; + out_body->len = 0; + } + return AWS_OP_SUCCESS; + } + /* currently the max node name is 256 characters. This is arbitrary, but should be enough * for our uses. If we ever generalize this, we'll have to come back and rethink this. */ uint8_t name_close[MAX_NAME_LEN + NODE_CLOSE_OVERHEAD] = {0}; |