diff --git a/ChangeLog b/ChangeLog index 523165c2..69b574a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Oct 11 14:32:00 CEST 2006 Daniel Veillard + + * libxml-2.0.pc.in: applied patch from Mikhail Zabaluev to separate + library flags for shared and static builds, fixes #344594. If this + bites you, use xml2-config. + Wed Oct 11 11:27:37 CEST 2006 Daniel Veillard * python/Makefile.am: remove the build path recorded in the python diff --git a/libxml-2.0.pc.in b/libxml-2.0.pc.in index c66f82bc..075848cc 100644 --- a/libxml-2.0.pc.in +++ b/libxml-2.0.pc.in @@ -8,5 +8,6 @@ Name: libXML Version: @VERSION@ Description: libXML library version2. Requires: -Libs: -L${libdir} -lxml2 @THREAD_LIBS@ @Z_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@ +Libs: -L${libdir} -lxml2 +Libs.private: @THREAD_LIBS@ @Z_LIBS@ @ICONV_LIBS@ @M_LIBS@ @LIBS@ Cflags: @XML_INCLUDEDIR@ @XML_CFLAGS@ diff --git a/xmlschemastypes.c b/xmlschemastypes.c index 987f85ff..a35c5396 100644 --- a/xmlschemastypes.c +++ b/xmlschemastypes.c @@ -5715,6 +5715,8 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue) if ((dec.frac == 0) || (dec.frac == dec.total)) bufsize++; buf = xmlMalloc(bufsize); + if (buf == NULL) + return(-1); offs = buf; if (dec.sign) *offs++ = '-'; @@ -5788,6 +5790,8 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue) if (dec.sign) bufsize++; *retValue = xmlMalloc(bufsize); + if (*retValue == NULL) + return(-1); if (dec.hi != 0) { if (dec.sign) snprintf((char *) *retValue, bufsize, @@ -5863,7 +5867,9 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue) case XML_SCHEMAS_GMONTH: { /* TODO: Unclear in XML Schema 1.0 */ /* TODO: What to do with the timezone? */ - *retValue = xmlMalloc(5); + *retValue = xmlMalloc(6); + if (*retValue == NULL) + return(-1); snprintf((char *) *retValue, 6, "--%02u", val->value.date.mon); } @@ -5872,6 +5878,8 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue) /* TODO: Unclear in XML Schema 1.0 */ /* TODO: What to do with the timezone? */ *retValue = xmlMalloc(6); + if (*retValue == NULL) + return(-1); snprintf((char *) *retValue, 6, "---%02u", val->value.date.day); } @@ -5880,6 +5888,8 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue) /* TODO: Unclear in XML Schema 1.0 */ /* TODO: What to do with the timezone? */ *retValue = xmlMalloc(8); + if (*retValue == NULL) + return(-1); snprintf((char *) *retValue, 8, "--%02u-%02u", val->value.date.mon, val->value.date.day); } @@ -6024,6 +6034,8 @@ xmlSchemaGetCanonValue(xmlSchemaValPtr val, const xmlChar **retValue) *retValue = BAD_CAST xmlStrdup(BAD_CAST "???"); return (1); } + if (*retValue == NULL) + return(-1); return (0); }