Added a comment about processFile giving problems on files larger than INT_MAX.
This commit is contained in:
parent
1d17d4f9f4
commit
b5bd929090
@ -69,14 +69,15 @@ reportError(XML_Parser parser, const XML_Char *filename)
|
|||||||
else
|
else
|
||||||
ftprintf(stderr, T("%s: (unknown message %d)\n"), filename, code);
|
ftprintf(stderr, T("%s: (unknown message %d)\n"), filename, code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* This implementation will give problems on files larger than INT_MAX. */
|
||||||
static void
|
static void
|
||||||
processFile(const void *data, size_t size,
|
processFile(const void *data, size_t size,
|
||||||
const XML_Char *filename, void *args)
|
const XML_Char *filename, void *args)
|
||||||
{
|
{
|
||||||
XML_Parser parser = ((PROCESS_ARGS *)args)->parser;
|
XML_Parser parser = ((PROCESS_ARGS *)args)->parser;
|
||||||
int *retPtr = ((PROCESS_ARGS *)args)->retPtr;
|
int *retPtr = ((PROCESS_ARGS *)args)->retPtr;
|
||||||
if (XML_Parse(parser, (const char *)data, size, 1) == XML_STATUS_ERROR) {
|
if (XML_Parse(parser, (const char *)data, (int)size, 1) == XML_STATUS_ERROR) {
|
||||||
reportError(parser, filename);
|
reportError(parser, filename);
|
||||||
*retPtr = 0;
|
*retPtr = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user