X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=src%2Ffcxml.c;h=06f1112a9955ad357e5cd46e9bc8378497afadea;hb=80c053b725669c1e982cceedb87f04ebb9c6f1e9;hp=bbe41fc1247334c70ecea4c11b5baa3843d897f4;hpb=c4bd0638c5f14329e71be8f170c30d376fc76972;p=fontconfig.git diff --git a/src/fcxml.c b/src/fcxml.c index bbe41fc..06f1112 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -1,5 +1,5 @@ /* - * $XFree86: xc/lib/fontconfig/src/fcxml.c,v 1.4 2002/02/20 00:32:30 keithp Exp $ + * $XFree86: xc/lib/fontconfig/src/fcxml.c,v 1.5 2002/02/22 18:54:07 keithp Exp $ * * Copyright © 2002 Keith Packard, member of The XFree86 Project, Inc. * @@ -1596,12 +1596,22 @@ FcConfigParseAndLoad (FcConfig *config, do { buf = XML_GetBuffer (p, BUFSIZ); if (!buf) + { + FcConfigError (&parse, "cannot get parse buffer"); goto bail3; + } len = fread (buf, 1, BUFSIZ, f); if (len < 0) + { + FcConfigError (&parse, "failed reading config file"); goto bail3; + } if (!XML_ParseBuffer (p, len, len == 0)) + { + FcConfigError (&parse, "%s", + XML_ErrorString (XML_GetErrorCode (p))); goto bail3; + } } while (len != 0); error = parse.error; bail3: