bu5hm4n pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=d7f43c6018b3f8be3053281c279681278fe269f1
commit d7f43c6018b3f8be3053281c279681278fe269f1 Author: Marcel Hollerbach <[email protected]> Date: Sat Dec 29 13:05:03 2018 +0100 examples: fix eina_simple_xml_parser --- src/examples/eina/eina_simple_xml_parser_01.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/examples/eina/eina_simple_xml_parser_01.c b/src/examples/eina/eina_simple_xml_parser_01.c index 0ad4ec3b85..824537c3b2 100644 --- a/src/examples/eina/eina_simple_xml_parser_01.c +++ b/src/examples/eina/eina_simple_xml_parser_01.c @@ -29,9 +29,15 @@ main(void) size = ftell(file); fseek(file, 0, SEEK_SET); + if (size < 0) + { + EINA_LOG_ERR("Can't read chat.xml"); + return 0; + } + if ((buffer = malloc(size))) { - if (fread(buffer, 1, size, file) != size) + if (fread(buffer, 1, size, file) != (unsigned long)size) { EINA_LOG_ERR("Can't read chat.xml"); } --
