| OLD | NEW |
| 1 /* | 1 /* |
| 2 * parser.c : an XML 1.0 parser, namespaces and validity support are mostly | 2 * parser.c : an XML 1.0 parser, namespaces and validity support are mostly |
| 3 * implemented on top of the SAX interfaces | 3 * implemented on top of the SAX interfaces |
| 4 * | 4 * |
| 5 * References: | 5 * References: |
| 6 * The XML specification: | 6 * The XML specification: |
| 7 * http://www.w3.org/TR/REC-xml | 7 * http://www.w3.org/TR/REC-xml |
| 8 * Original 1.0 version: | 8 * Original 1.0 version: |
| 9 * http://www.w3.org/TR/1998/REC-xml-19980210 | 9 * http://www.w3.org/TR/1998/REC-xml-19980210 |
| 10 * XML second edition working draft | 10 * XML second edition working draft |
| (...skipping 9807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9818 const xmlChar *URI, int line, int nsNr, int tlen) { | 9818 const xmlChar *URI, int line, int nsNr, int tlen) { |
| 9819 const xmlChar *name; | 9819 const xmlChar *name; |
| 9820 | 9820 |
| 9821 GROW; | 9821 GROW; |
| 9822 if ((RAW != '<') || (NXT(1) != '/')) { | 9822 if ((RAW != '<') || (NXT(1) != '/')) { |
| 9823 xmlFatalErr(ctxt, XML_ERR_LTSLASH_REQUIRED, NULL); | 9823 xmlFatalErr(ctxt, XML_ERR_LTSLASH_REQUIRED, NULL); |
| 9824 return; | 9824 return; |
| 9825 } | 9825 } |
| 9826 SKIP(2); | 9826 SKIP(2); |
| 9827 | 9827 |
| 9828 if ((tlen > 0) && (xmlStrncmp(ctxt->input->cur, ctxt->name, tlen) == 0)) { | 9828 size_t curLength = ctxt->input->end - ctxt->input->cur; |
| 9829 if (ctxt->input->cur[tlen] == '>') { | 9829 if ((tlen > 0) && (curLength >= (size_t)tlen) && (xmlStrncmp(ctxt->input->cu
r, ctxt->name, tlen) == 0)) { |
| 9830 if ((curLength >= (size_t)(tlen + 1)) && (ctxt->input->cur[tlen] == '>'))
{ |
| 9830 ctxt->input->cur += tlen + 1; | 9831 ctxt->input->cur += tlen + 1; |
| 9831 ctxt->input->col += tlen + 1; | 9832 ctxt->input->col += tlen + 1; |
| 9832 goto done; | 9833 goto done; |
| 9833 } | 9834 } |
| 9834 ctxt->input->cur += tlen; | 9835 ctxt->input->cur += tlen; |
| 9835 ctxt->input->col += tlen; | 9836 ctxt->input->col += tlen; |
| 9836 name = (xmlChar*)1; | 9837 name = (xmlChar*)1; |
| 9837 } else { | 9838 } else { |
| 9838 if (prefix == NULL) | 9839 if (prefix == NULL) |
| 9839 name = xmlParseNameAndCompare(ctxt, ctxt->name); | 9840 name = xmlParseNameAndCompare(ctxt, ctxt->name); |
| (...skipping 5927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15767 if (stream == NULL) { | 15768 if (stream == NULL) { |
| 15768 xmlFreeParserInputBuffer(input); | 15769 xmlFreeParserInputBuffer(input); |
| 15769 return (NULL); | 15770 return (NULL); |
| 15770 } | 15771 } |
| 15771 inputPush(ctxt, stream); | 15772 inputPush(ctxt, stream); |
| 15772 return (xmlDoRead(ctxt, URL, encoding, options, 1)); | 15773 return (xmlDoRead(ctxt, URL, encoding, options, 1)); |
| 15773 } | 15774 } |
| 15774 | 15775 |
| 15775 #define bottom_parser | 15776 #define bottom_parser |
| 15776 #include "elfgcchack.h" | 15777 #include "elfgcchack.h" |
| OLD | NEW |