mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-14 20:01:04 +03:00
removed some warnings by casting xmlChar to unsigned int and a couple of
* DOCBparser.c HTMLparser.c entities.c parser.c relaxng.c xmlschemas.c xpath.c: removed some warnings by casting xmlChar to unsigned int and a couple of others. * xmlschemastypes.c: fixes a segfault on empty hexBinary strings Daniel
This commit is contained in:
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Tue Jul 15 15:30:55 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* DOCBparser.c HTMLparser.c entities.c parser.c relaxng.c
|
||||||
|
xmlschemas.c xpath.c: removed some warnings by casting xmlChar
|
||||||
|
to unsigned int and a couple of others.
|
||||||
|
|
||||||
|
Fri Jul 11 16:44:22 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* xmlschemastypes.c: fixes a segfault on empty hexBinary strings
|
||||||
|
|
||||||
Thu Jul 10 16:02:47 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
Thu Jul 10 16:02:47 CEST 2003 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* nanoftp.c nanohttp.c: cleanup patches from Peter Breitenlohner
|
* nanoftp.c nanohttp.c: cleanup patches from Peter Breitenlohner
|
||||||
|
16
DOCBparser.c
16
DOCBparser.c
@ -2917,9 +2917,9 @@ docbParseSystemLiteral(docbParserCtxtPtr ctxt) {
|
|||||||
if (CUR == '"') {
|
if (CUR == '"') {
|
||||||
NEXT;
|
NEXT;
|
||||||
q = CUR_PTR;
|
q = CUR_PTR;
|
||||||
while ((IS_CHAR(CUR)) && (CUR != '"'))
|
while ((IS_CHAR((unsigned int) CUR)) && (CUR != '"'))
|
||||||
NEXT;
|
NEXT;
|
||||||
if (!IS_CHAR(CUR)) {
|
if (!IS_CHAR((unsigned int) CUR)) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData, "Unfinished SystemLiteral\n");
|
ctxt->sax->error(ctxt->userData, "Unfinished SystemLiteral\n");
|
||||||
ctxt->wellFormed = 0;
|
ctxt->wellFormed = 0;
|
||||||
@ -2930,9 +2930,9 @@ docbParseSystemLiteral(docbParserCtxtPtr ctxt) {
|
|||||||
} else if (CUR == '\'') {
|
} else if (CUR == '\'') {
|
||||||
NEXT;
|
NEXT;
|
||||||
q = CUR_PTR;
|
q = CUR_PTR;
|
||||||
while ((IS_CHAR(CUR)) && (CUR != '\''))
|
while ((IS_CHAR((unsigned int) CUR)) && (CUR != '\''))
|
||||||
NEXT;
|
NEXT;
|
||||||
if (!IS_CHAR(CUR)) {
|
if (!IS_CHAR((unsigned int) CUR)) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData, "Unfinished SystemLiteral\n");
|
ctxt->sax->error(ctxt->userData, "Unfinished SystemLiteral\n");
|
||||||
ctxt->wellFormed = 0;
|
ctxt->wellFormed = 0;
|
||||||
@ -3724,7 +3724,7 @@ docbParseStartTag(docbParserCtxtPtr ctxt) {
|
|||||||
* (S Attribute)* S?
|
* (S Attribute)* S?
|
||||||
*/
|
*/
|
||||||
SKIP_BLANKS;
|
SKIP_BLANKS;
|
||||||
while ((IS_CHAR(CUR)) &&
|
while ((IS_CHAR((unsigned int) CUR)) &&
|
||||||
(CUR != '>') &&
|
(CUR != '>') &&
|
||||||
((CUR != '/') || (NXT(1) != '>'))) {
|
((CUR != '/') || (NXT(1) != '>'))) {
|
||||||
long cons = ctxt->nbChars;
|
long cons = ctxt->nbChars;
|
||||||
@ -3870,7 +3870,7 @@ docbParseEndTag(docbParserCtxtPtr ctxt) {
|
|||||||
* We should definitely be at the ending "S? '>'" part
|
* We should definitely be at the ending "S? '>'" part
|
||||||
*/
|
*/
|
||||||
SKIP_BLANKS;
|
SKIP_BLANKS;
|
||||||
if ((!IS_CHAR(CUR)) || (CUR != '>')) {
|
if ((!IS_CHAR((unsigned int) CUR)) || (CUR != '>')) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData, "End tag : expected '>'\n");
|
ctxt->sax->error(ctxt->userData, "End tag : expected '>'\n");
|
||||||
ctxt->wellFormed = 0;
|
ctxt->wellFormed = 0;
|
||||||
@ -4323,12 +4323,12 @@ docbParseElement(docbParserCtxtPtr ctxt) {
|
|||||||
*/
|
*/
|
||||||
currentNode = xmlStrdup(ctxt->name);
|
currentNode = xmlStrdup(ctxt->name);
|
||||||
depth = ctxt->nameNr;
|
depth = ctxt->nameNr;
|
||||||
while (IS_CHAR(CUR)) {
|
while (IS_CHAR((unsigned int) CUR)) {
|
||||||
docbParseContent(ctxt);
|
docbParseContent(ctxt);
|
||||||
if (ctxt->nameNr < depth) break;
|
if (ctxt->nameNr < depth) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IS_CHAR(CUR)) {
|
if (!IS_CHAR((unsigned int) CUR)) {
|
||||||
/************
|
/************
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData,
|
ctxt->sax->error(ctxt->userData,
|
||||||
|
27
HTMLparser.c
27
HTMLparser.c
@ -2565,9 +2565,9 @@ htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) {
|
|||||||
if (CUR == '"') {
|
if (CUR == '"') {
|
||||||
NEXT;
|
NEXT;
|
||||||
q = CUR_PTR;
|
q = CUR_PTR;
|
||||||
while ((IS_CHAR(CUR)) && (CUR != '"'))
|
while ((IS_CHAR((unsigned int) CUR)) && (CUR != '"'))
|
||||||
NEXT;
|
NEXT;
|
||||||
if (!IS_CHAR(CUR)) {
|
if (!IS_CHAR((unsigned int) CUR)) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData, "Unfinished SystemLiteral\n");
|
ctxt->sax->error(ctxt->userData, "Unfinished SystemLiteral\n");
|
||||||
ctxt->wellFormed = 0;
|
ctxt->wellFormed = 0;
|
||||||
@ -2578,9 +2578,9 @@ htmlParseSystemLiteral(htmlParserCtxtPtr ctxt) {
|
|||||||
} else if (CUR == '\'') {
|
} else if (CUR == '\'') {
|
||||||
NEXT;
|
NEXT;
|
||||||
q = CUR_PTR;
|
q = CUR_PTR;
|
||||||
while ((IS_CHAR(CUR)) && (CUR != '\''))
|
while ((IS_CHAR((unsigned int) CUR)) && (CUR != '\''))
|
||||||
NEXT;
|
NEXT;
|
||||||
if (!IS_CHAR(CUR)) {
|
if (!IS_CHAR((unsigned int) CUR)) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData, "Unfinished SystemLiteral\n");
|
ctxt->sax->error(ctxt->userData, "Unfinished SystemLiteral\n");
|
||||||
ctxt->wellFormed = 0;
|
ctxt->wellFormed = 0;
|
||||||
@ -2679,7 +2679,7 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
|
|||||||
|
|
||||||
SHRINK;
|
SHRINK;
|
||||||
cur = CUR;
|
cur = CUR;
|
||||||
while (IS_CHAR(cur)) {
|
while (IS_CHAR((unsigned int) cur)) {
|
||||||
if ((cur == '<') && (NXT(1) == '!') && (NXT(2) == '-') &&
|
if ((cur == '<') && (NXT(1) == '!') && (NXT(2) == '-') &&
|
||||||
(NXT(3) == '-')) {
|
(NXT(3) == '-')) {
|
||||||
if ((nbchar != 0) && (ctxt->sax != NULL) && (!ctxt->disableSAX)) {
|
if ((nbchar != 0) && (ctxt->sax != NULL) && (!ctxt->disableSAX)) {
|
||||||
@ -2722,7 +2722,7 @@ htmlParseScript(htmlParserCtxtPtr ctxt) {
|
|||||||
NEXT;
|
NEXT;
|
||||||
cur = CUR;
|
cur = CUR;
|
||||||
}
|
}
|
||||||
if (!(IS_CHAR(cur))) {
|
if (!(IS_CHAR((unsigned int) cur))) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData,
|
ctxt->sax->error(ctxt->userData,
|
||||||
"Invalid char in CDATA 0x%X\n", cur);
|
"Invalid char in CDATA 0x%X\n", cur);
|
||||||
@ -3319,7 +3319,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
|
|||||||
"htmlParseStartTag: invalid element name\n");
|
"htmlParseStartTag: invalid element name\n");
|
||||||
ctxt->wellFormed = 0;
|
ctxt->wellFormed = 0;
|
||||||
/* Dump the bogus tag like browsers do */
|
/* Dump the bogus tag like browsers do */
|
||||||
while ((IS_CHAR(CUR)) && (CUR != '>'))
|
while ((IS_CHAR((unsigned int) CUR)) && (CUR != '>'))
|
||||||
NEXT;
|
NEXT;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -3377,7 +3377,7 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
|
|||||||
* (S Attribute)* S?
|
* (S Attribute)* S?
|
||||||
*/
|
*/
|
||||||
SKIP_BLANKS;
|
SKIP_BLANKS;
|
||||||
while ((IS_CHAR(CUR)) &&
|
while ((IS_CHAR((unsigned int) CUR)) &&
|
||||||
(CUR != '>') &&
|
(CUR != '>') &&
|
||||||
((CUR != '/') || (NXT(1) != '>'))) {
|
((CUR != '/') || (NXT(1) != '>'))) {
|
||||||
long cons = ctxt->nbChars;
|
long cons = ctxt->nbChars;
|
||||||
@ -3436,8 +3436,9 @@ htmlParseStartTag(htmlParserCtxtPtr ctxt) {
|
|||||||
else {
|
else {
|
||||||
/* Dump the bogus attribute string up to the next blank or
|
/* Dump the bogus attribute string up to the next blank or
|
||||||
* the end of the tag. */
|
* the end of the tag. */
|
||||||
while ((IS_CHAR(CUR)) && !(IS_BLANK(CUR)) && (CUR != '>')
|
while ((IS_CHAR((unsigned int) CUR)) &&
|
||||||
&& ((CUR != '/') || (NXT(1) != '>')))
|
!(IS_BLANK(CUR)) && (CUR != '>') &&
|
||||||
|
((CUR != '/') || (NXT(1) != '>')))
|
||||||
NEXT;
|
NEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3514,7 +3515,7 @@ htmlParseEndTag(htmlParserCtxtPtr ctxt) {
|
|||||||
* We should definitely be at the ending "S? '>'" part
|
* We should definitely be at the ending "S? '>'" part
|
||||||
*/
|
*/
|
||||||
SKIP_BLANKS;
|
SKIP_BLANKS;
|
||||||
if ((!IS_CHAR(CUR)) || (CUR != '>')) {
|
if ((!IS_CHAR((unsigned int) CUR)) || (CUR != '>')) {
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData, "End tag : expected '>'\n");
|
ctxt->sax->error(ctxt->userData, "End tag : expected '>'\n");
|
||||||
ctxt->wellFormed = 0;
|
ctxt->wellFormed = 0;
|
||||||
@ -3931,7 +3932,7 @@ htmlParseElement(htmlParserCtxtPtr ctxt) {
|
|||||||
*/
|
*/
|
||||||
currentNode = xmlStrdup(ctxt->name);
|
currentNode = xmlStrdup(ctxt->name);
|
||||||
depth = ctxt->nameNr;
|
depth = ctxt->nameNr;
|
||||||
while (IS_CHAR(CUR)) {
|
while (IS_CHAR((unsigned int) CUR)) {
|
||||||
oldptr = ctxt->input->cur;
|
oldptr = ctxt->input->cur;
|
||||||
htmlParseContent(ctxt);
|
htmlParseContent(ctxt);
|
||||||
if (oldptr==ctxt->input->cur) break;
|
if (oldptr==ctxt->input->cur) break;
|
||||||
@ -3948,7 +3949,7 @@ htmlParseElement(htmlParserCtxtPtr ctxt) {
|
|||||||
node_info.node = ctxt->node;
|
node_info.node = ctxt->node;
|
||||||
xmlParserAddNodeInfo(ctxt, &node_info);
|
xmlParserAddNodeInfo(ctxt, &node_info);
|
||||||
}
|
}
|
||||||
if (!IS_CHAR(CUR)) {
|
if (!IS_CHAR((unsigned int) CUR)) {
|
||||||
htmlAutoCloseOnEnd(ctxt);
|
htmlAutoCloseOnEnd(ctxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -532,7 +532,7 @@ xmlEncodeEntities(xmlDocPtr doc, const xmlChar *input) {
|
|||||||
ptr = buf;
|
ptr = buf;
|
||||||
while (*ptr != 0) *out++ = *ptr++;
|
while (*ptr != 0) *out++ = *ptr++;
|
||||||
#endif
|
#endif
|
||||||
} else if (IS_CHAR(*cur)) {
|
} else if (IS_CHAR((unsigned int) *cur)) {
|
||||||
char buf[10], *ptr;
|
char buf[10], *ptr;
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "&#%d;", *cur);
|
snprintf(buf, sizeof(buf), "&#%d;", *cur);
|
||||||
@ -731,7 +731,7 @@ xmlEncodeEntitiesReentrant(xmlDocPtr doc, const xmlChar *input) {
|
|||||||
cur += l;
|
cur += l;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
} else if (IS_CHAR(*cur)) {
|
} else if (IS_CHAR((unsigned int) *cur)) {
|
||||||
char buf[10], *ptr;
|
char buf[10], *ptr;
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), "&#%d;", *cur);
|
snprintf(buf, sizeof(buf), "&#%d;", *cur);
|
||||||
|
6
parser.c
6
parser.c
@ -6714,7 +6714,7 @@ xmlParseStartTag(xmlParserCtxtPtr ctxt) {
|
|||||||
|
|
||||||
while ((RAW != '>') &&
|
while ((RAW != '>') &&
|
||||||
((RAW != '/') || (NXT(1) != '>')) &&
|
((RAW != '/') || (NXT(1) != '>')) &&
|
||||||
(IS_CHAR(RAW))) {
|
(IS_CHAR((unsigned int) RAW))) {
|
||||||
const xmlChar *q = CUR_PTR;
|
const xmlChar *q = CUR_PTR;
|
||||||
unsigned int cons = ctxt->input->consumed;
|
unsigned int cons = ctxt->input->consumed;
|
||||||
|
|
||||||
@ -6870,7 +6870,7 @@ xmlParseEndTagInternal(xmlParserCtxtPtr ctxt, int line) {
|
|||||||
*/
|
*/
|
||||||
GROW;
|
GROW;
|
||||||
SKIP_BLANKS;
|
SKIP_BLANKS;
|
||||||
if ((!IS_CHAR(RAW)) || (RAW != '>')) {
|
if ((!IS_CHAR((unsigned int) RAW)) || (RAW != '>')) {
|
||||||
ctxt->errNo = XML_ERR_GT_REQUIRED;
|
ctxt->errNo = XML_ERR_GT_REQUIRED;
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData, "End tag : expected '>'\n");
|
ctxt->sax->error(ctxt->userData, "End tag : expected '>'\n");
|
||||||
@ -7274,7 +7274,7 @@ xmlParseElement(xmlParserCtxtPtr ctxt) {
|
|||||||
* Parse the content of the element:
|
* Parse the content of the element:
|
||||||
*/
|
*/
|
||||||
xmlParseContent(ctxt);
|
xmlParseContent(ctxt);
|
||||||
if (!IS_CHAR(RAW)) {
|
if (!IS_CHAR((unsigned int) RAW)) {
|
||||||
ctxt->errNo = XML_ERR_TAG_NOT_FINISHED;
|
ctxt->errNo = XML_ERR_TAG_NOT_FINISHED;
|
||||||
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
|
||||||
ctxt->sax->error(ctxt->userData,
|
ctxt->sax->error(ctxt->userData,
|
||||||
|
16
relaxng.c
16
relaxng.c
@ -2029,13 +2029,13 @@ xmlRelaxNGValidErrorContext(xmlRelaxNGValidCtxtPtr ctxt, xmlNodePtr node,
|
|||||||
* Try to find contextual informations to report
|
* Try to find contextual informations to report
|
||||||
*/
|
*/
|
||||||
if (node->type == XML_ELEMENT_NODE) {
|
if (node->type == XML_ELEMENT_NODE) {
|
||||||
line = (int) node->content;
|
line = (long) node->content;
|
||||||
} else if ((node->prev != NULL) &&
|
} else if ((node->prev != NULL) &&
|
||||||
(node->prev->type == XML_ELEMENT_NODE)) {
|
(node->prev->type == XML_ELEMENT_NODE)) {
|
||||||
line = (int) node->prev->content;
|
line = (long) node->prev->content;
|
||||||
} else if ((node->parent != NULL) &&
|
} else if ((node->parent != NULL) &&
|
||||||
(node->parent->type == XML_ELEMENT_NODE)) {
|
(node->parent->type == XML_ELEMENT_NODE)) {
|
||||||
line = (int) node->parent->content;
|
line = (long) node->parent->content;
|
||||||
}
|
}
|
||||||
if ((node->doc != NULL) && (node->doc->URL != NULL))
|
if ((node->doc != NULL) && (node->doc->URL != NULL))
|
||||||
file = node->doc->URL;
|
file = node->doc->URL;
|
||||||
@ -4113,7 +4113,7 @@ xmlRelaxNGComputeInterleaves(xmlRelaxNGDefinePtr def,
|
|||||||
if ((*tmp)->type == XML_RELAXNG_TEXT) {
|
if ((*tmp)->type == XML_RELAXNG_TEXT) {
|
||||||
res = xmlHashAddEntry2(partitions->triage,
|
res = xmlHashAddEntry2(partitions->triage,
|
||||||
BAD_CAST "#text", NULL,
|
BAD_CAST "#text", NULL,
|
||||||
(void *)(i + 1));
|
(void *)(long)(i + 1));
|
||||||
if (res != 0)
|
if (res != 0)
|
||||||
is_determinist = -1;
|
is_determinist = -1;
|
||||||
} else if (((*tmp)->type == XML_RELAXNG_ELEMENT) &&
|
} else if (((*tmp)->type == XML_RELAXNG_ELEMENT) &&
|
||||||
@ -4121,22 +4121,22 @@ xmlRelaxNGComputeInterleaves(xmlRelaxNGDefinePtr def,
|
|||||||
if (((*tmp)->ns == NULL) || ((*tmp)->ns[0] == 0))
|
if (((*tmp)->ns == NULL) || ((*tmp)->ns[0] == 0))
|
||||||
res = xmlHashAddEntry2(partitions->triage,
|
res = xmlHashAddEntry2(partitions->triage,
|
||||||
(*tmp)->name, NULL,
|
(*tmp)->name, NULL,
|
||||||
(void *)(i + 1));
|
(void *)(long)(i + 1));
|
||||||
else
|
else
|
||||||
res = xmlHashAddEntry2(partitions->triage,
|
res = xmlHashAddEntry2(partitions->triage,
|
||||||
(*tmp)->name, (*tmp)->ns,
|
(*tmp)->name, (*tmp)->ns,
|
||||||
(void *)(i + 1));
|
(void *)(long)(i + 1));
|
||||||
if (res != 0)
|
if (res != 0)
|
||||||
is_determinist = -1;
|
is_determinist = -1;
|
||||||
} else if ((*tmp)->type == XML_RELAXNG_ELEMENT) {
|
} else if ((*tmp)->type == XML_RELAXNG_ELEMENT) {
|
||||||
if (((*tmp)->ns == NULL) || ((*tmp)->ns[0] == 0))
|
if (((*tmp)->ns == NULL) || ((*tmp)->ns[0] == 0))
|
||||||
res = xmlHashAddEntry2(partitions->triage,
|
res = xmlHashAddEntry2(partitions->triage,
|
||||||
BAD_CAST "#any", NULL,
|
BAD_CAST "#any", NULL,
|
||||||
(void *)(i + 1));
|
(void *)(long)(i + 1));
|
||||||
else
|
else
|
||||||
res = xmlHashAddEntry2(partitions->triage,
|
res = xmlHashAddEntry2(partitions->triage,
|
||||||
BAD_CAST "#any", (*tmp)->ns,
|
BAD_CAST "#any", (*tmp)->ns,
|
||||||
(void *)(i + 1));
|
(void *)(long)(i + 1));
|
||||||
if ((*tmp)->nameClass != NULL)
|
if ((*tmp)->nameClass != NULL)
|
||||||
is_determinist = 2;
|
is_determinist = 2;
|
||||||
if (res != 0)
|
if (res != 0)
|
||||||
|
@ -459,13 +459,13 @@ xmlSchemaErrorContext(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
|
|||||||
* Try to find contextual informations to report
|
* Try to find contextual informations to report
|
||||||
*/
|
*/
|
||||||
if (node->type == XML_ELEMENT_NODE) {
|
if (node->type == XML_ELEMENT_NODE) {
|
||||||
line = (int) node->content;
|
line = (long) node->content;
|
||||||
} else if ((node->prev != NULL) &&
|
} else if ((node->prev != NULL) &&
|
||||||
(node->prev->type == XML_ELEMENT_NODE)) {
|
(node->prev->type == XML_ELEMENT_NODE)) {
|
||||||
line = (int) node->prev->content;
|
line = (long) node->prev->content;
|
||||||
} else if ((node->parent != NULL) &&
|
} else if ((node->parent != NULL) &&
|
||||||
(node->parent->type == XML_ELEMENT_NODE)) {
|
(node->parent->type == XML_ELEMENT_NODE)) {
|
||||||
line = (int) node->parent->content;
|
line = (long) node->parent->content;
|
||||||
}
|
}
|
||||||
if ((node->doc != NULL) && (node->doc->URL != NULL))
|
if ((node->doc != NULL) && (node->doc->URL != NULL))
|
||||||
file = node->doc->URL;
|
file = node->doc->URL;
|
||||||
|
@ -1924,6 +1924,8 @@ xmlSchemaValAtomicType(xmlSchemaTypePtr type, const xmlChar *value,
|
|||||||
unsigned long lo = 0, mi = 0, hi = 0;
|
unsigned long lo = 0, mi = 0, hi = 0;
|
||||||
unsigned long *base;
|
unsigned long *base;
|
||||||
|
|
||||||
|
if (cur == NULL)
|
||||||
|
goto return1;
|
||||||
tmp = cur;
|
tmp = cur;
|
||||||
while (((*tmp >= '0') && (*tmp <= '9')) ||
|
while (((*tmp >= '0') && (*tmp <= '9')) ||
|
||||||
((*tmp >= 'A') && (*tmp <= 'F')) ||
|
((*tmp >= 'A') && (*tmp <= 'F')) ||
|
||||||
|
16
xpath.c
16
xpath.c
@ -7560,9 +7560,9 @@ xmlXPathParseLiteral(xmlXPathParserContextPtr ctxt) {
|
|||||||
if (CUR == '"') {
|
if (CUR == '"') {
|
||||||
NEXT;
|
NEXT;
|
||||||
q = CUR_PTR;
|
q = CUR_PTR;
|
||||||
while ((IS_CHAR(CUR)) && (CUR != '"'))
|
while ((IS_CHAR((unsigned int) CUR)) && (CUR != '"'))
|
||||||
NEXT;
|
NEXT;
|
||||||
if (!IS_CHAR(CUR)) {
|
if (!IS_CHAR((unsigned int) CUR)) {
|
||||||
XP_ERROR0(XPATH_UNFINISHED_LITERAL_ERROR);
|
XP_ERROR0(XPATH_UNFINISHED_LITERAL_ERROR);
|
||||||
} else {
|
} else {
|
||||||
ret = xmlStrndup(q, CUR_PTR - q);
|
ret = xmlStrndup(q, CUR_PTR - q);
|
||||||
@ -7571,9 +7571,9 @@ xmlXPathParseLiteral(xmlXPathParserContextPtr ctxt) {
|
|||||||
} else if (CUR == '\'') {
|
} else if (CUR == '\'') {
|
||||||
NEXT;
|
NEXT;
|
||||||
q = CUR_PTR;
|
q = CUR_PTR;
|
||||||
while ((IS_CHAR(CUR)) && (CUR != '\''))
|
while ((IS_CHAR((unsigned int) CUR)) && (CUR != '\''))
|
||||||
NEXT;
|
NEXT;
|
||||||
if (!IS_CHAR(CUR)) {
|
if (!IS_CHAR((unsigned int) CUR)) {
|
||||||
XP_ERROR0(XPATH_UNFINISHED_LITERAL_ERROR);
|
XP_ERROR0(XPATH_UNFINISHED_LITERAL_ERROR);
|
||||||
} else {
|
} else {
|
||||||
ret = xmlStrndup(q, CUR_PTR - q);
|
ret = xmlStrndup(q, CUR_PTR - q);
|
||||||
@ -7604,9 +7604,9 @@ xmlXPathCompLiteral(xmlXPathParserContextPtr ctxt) {
|
|||||||
if (CUR == '"') {
|
if (CUR == '"') {
|
||||||
NEXT;
|
NEXT;
|
||||||
q = CUR_PTR;
|
q = CUR_PTR;
|
||||||
while ((IS_CHAR(CUR)) && (CUR != '"'))
|
while ((IS_CHAR((unsigned int) CUR)) && (CUR != '"'))
|
||||||
NEXT;
|
NEXT;
|
||||||
if (!IS_CHAR(CUR)) {
|
if (!IS_CHAR((unsigned int) CUR)) {
|
||||||
XP_ERROR(XPATH_UNFINISHED_LITERAL_ERROR);
|
XP_ERROR(XPATH_UNFINISHED_LITERAL_ERROR);
|
||||||
} else {
|
} else {
|
||||||
ret = xmlStrndup(q, CUR_PTR - q);
|
ret = xmlStrndup(q, CUR_PTR - q);
|
||||||
@ -7615,9 +7615,9 @@ xmlXPathCompLiteral(xmlXPathParserContextPtr ctxt) {
|
|||||||
} else if (CUR == '\'') {
|
} else if (CUR == '\'') {
|
||||||
NEXT;
|
NEXT;
|
||||||
q = CUR_PTR;
|
q = CUR_PTR;
|
||||||
while ((IS_CHAR(CUR)) && (CUR != '\''))
|
while ((IS_CHAR((unsigned int) CUR)) && (CUR != '\''))
|
||||||
NEXT;
|
NEXT;
|
||||||
if (!IS_CHAR(CUR)) {
|
if (!IS_CHAR((unsigned int) CUR)) {
|
||||||
XP_ERROR(XPATH_UNFINISHED_LITERAL_ERROR);
|
XP_ERROR(XPATH_UNFINISHED_LITERAL_ERROR);
|
||||||
} else {
|
} else {
|
||||||
ret = xmlStrndup(q, CUR_PTR - q);
|
ret = xmlStrndup(q, CUR_PTR - q);
|
||||||
|
Reference in New Issue
Block a user