Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: third_party/libxml/src/parser.c

Issue 2603933002: Give up looking up interned names if the encoding changed during parsing (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/libxml/README.chromium ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3408 matching lines...) Expand 10 before | Expand all | Expand 10 after
3419 return(NULL); 3419 return(NULL);
3420 c = CUR_CHAR(l); 3420 c = CUR_CHAR(l);
3421 } 3421 }
3422 } 3422 }
3423 } 3423 }
3424 if ((len > XML_MAX_NAME_LENGTH) && 3424 if ((len > XML_MAX_NAME_LENGTH) &&
3425 ((ctxt->options & XML_PARSE_HUGE) == 0)) { 3425 ((ctxt->options & XML_PARSE_HUGE) == 0)) {
3426 xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "Name"); 3426 xmlFatalErr(ctxt, XML_ERR_NAME_TOO_LONG, "Name");
3427 return(NULL); 3427 return(NULL);
3428 } 3428 }
3429 if ((*ctxt->input->cur == '\n') && (ctxt->input->cur[-1] == '\r')) 3429 if ((*ctxt->input->cur == '\n') && (ctxt->input->cur[-1] == '\r')) {
3430 if (ctxt->input->base > ctxt->input->cur - (len + 1)) {
3431 return(NULL);
3432 }
3430 return(xmlDictLookup(ctxt->dict, ctxt->input->cur - (len + 1), len)); 3433 return(xmlDictLookup(ctxt->dict, ctxt->input->cur - (len + 1), len));
3434 }
3435 if (ctxt->input->base > ctxt->input->cur - len) {
3436 return(NULL);
3437 }
3431 return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len)); 3438 return(xmlDictLookup(ctxt->dict, ctxt->input->cur - len, len));
3432 } 3439 }
3433 3440
3434 /** 3441 /**
3435 * xmlParseName: 3442 * xmlParseName:
3436 * @ctxt: an XML parser context 3443 * @ctxt: an XML parser context
3437 * 3444 *
3438 * parse an XML name. 3445 * parse an XML name.
3439 * 3446 *
3440 * [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | 3447 * [4] NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' |
(...skipping 12384 matching lines...) Expand 10 before | Expand all | Expand 10 after
15825 if (stream == NULL) { 15832 if (stream == NULL) {
15826 xmlFreeParserInputBuffer(input); 15833 xmlFreeParserInputBuffer(input);
15827 return (NULL); 15834 return (NULL);
15828 } 15835 }
15829 inputPush(ctxt, stream); 15836 inputPush(ctxt, stream);
15830 return (xmlDoRead(ctxt, URL, encoding, options, 1)); 15837 return (xmlDoRead(ctxt, URL, encoding, options, 1));
15831 } 15838 }
15832 15839
15833 #define bottom_parser 15840 #define bottom_parser
15834 #include "elfgcchack.h" 15841 #include "elfgcchack.h"
OLDNEW
« no previous file with comments | « third_party/libxml/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698