mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-30 22:43:14 +03:00
get rid of all the perror() calls made in the library execution paths.
* DOCBparser.c HTMLparser.c c14n.c entities.c list.c parser.c parserInternals.c xmlIO.c: get rid of all the perror() calls made in the library execution paths. This should fix both #92059 and #92385 Daniel
This commit is contained in:
11
parser.c
11
parser.c
@ -931,7 +931,7 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
|
||||
buffer = (xmlChar *) \
|
||||
xmlRealloc(buffer, buffer##_size * sizeof(xmlChar)); \
|
||||
if (buffer == NULL) { \
|
||||
perror("realloc failed"); \
|
||||
xmlGenericError(xmlGenericErrorContext, "realloc failed"); \
|
||||
return(NULL); \
|
||||
} \
|
||||
}
|
||||
@ -984,7 +984,8 @@ xmlStringDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int what,
|
||||
buffer_size = XML_PARSER_BIG_BUFFER_SIZE;
|
||||
buffer = (xmlChar *) xmlMalloc(buffer_size * sizeof(xmlChar));
|
||||
if (buffer == NULL) {
|
||||
perror("xmlStringDecodeEntities: malloc failed");
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"xmlStringDecodeEntities: malloc failed");
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
@ -2341,7 +2342,8 @@ xmlParseAttValueComplex(xmlParserCtxtPtr ctxt) {
|
||||
buf_size = XML_PARSER_BUFFER_SIZE;
|
||||
buf = (xmlChar *) xmlMalloc(buf_size * sizeof(xmlChar));
|
||||
if (buf == NULL) {
|
||||
perror("xmlParseAttValue: malloc failed");
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"xmlParseAttValue: malloc failed");
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
@ -10191,7 +10193,8 @@ xmlSetupParserForBuffer(xmlParserCtxtPtr ctxt, const xmlChar* buffer,
|
||||
|
||||
input = xmlNewInputStream(ctxt);
|
||||
if (input == NULL) {
|
||||
perror("malloc");
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"malloc");
|
||||
xmlFree(ctxt);
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user