on master help sign in
Segfaults when `decodeFile` throws "file not found" (#5)
9ec21cbMichael Snoyman
c/helper.c+1
@@ -137,5 +137,6 @@ int yaml_parser_set_input_filename(yaml_parser_t *parser, const char *filename)
137
137
138int fclose_helper(FILE *file, yaml_parser_t *parser)
138int fclose_helper(FILE *file, yaml_parser_t *parser)
139{
139{
140+ if (! file) return 0;
140 return fclose(file);
141 return fclose(file);
141}
142}
yaml.cabal+1−1
@@ -1,5 +1,5 @@
1name: yaml
1name: yaml
2−version: 0.4.1.1
2+version: 0.4.1.2
3license: BSD3
3license: BSD3
4license-file: LICENSE
4license-file: LICENSE
5author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov
5author: Michael Snoyman <michael@snoyman.com>, Anton Ageev <antage@gmail.com>,Kirill Simonov