Segfaults when `decodeFile` throws "file not found" (#5)
commit9ec21cb4e1988a52ec473b864bb28bf4b057c02e
authorMichael Snoyman <michael@snoyman.com>
dateThu 8 Dec 2011, 09:23 (15 years ago)
parent54826d4
c/helper.c+1
@@ -137,5 +137,6 @@ int yaml_parser_set_input_filename(yaml_parser_t *parser, const char *filename)
137137
138138int fclose_helper(FILE *file, yaml_parser_t *parser)
139139{
140+ if (! file) return 0;
140141 return fclose(file);
141142}
yaml.cabal+1−1
@@ -1,5 +1,5 @@
11name: yaml
2−version: 0.4.1.1
2+version: 0.4.1.2
33license: BSD3
44license-file: LICENSE
55author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov