cedric pushed a commit to branch edje-1.7. http://git.enlightenment.org/legacy/edje.git/commit/?id=36385230a39c6d9a6ab7e1d97b5285cce6a927ae
commit 36385230a39c6d9a6ab7e1d97b5285cce6a927ae Author: Cedric Bail <[email protected]> Date: Tue Nov 5 16:44:56 2013 +0900 epp: avoid to rely on undefined behavior for fopen. In the case we didn't define the file to save to, fopen would have been called with a NULL parameter. The result of that call is not really defined and could have led to some crash at some point. --- src/bin/epp/cpplib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/epp/cpplib.c b/src/bin/epp/cpplib.c index 30c7f01..1b8bd48 100644 --- a/src/bin/epp/cpplib.c +++ b/src/bin/epp/cpplib.c @@ -7453,6 +7453,7 @@ using_file(const char *filename) { FILE *f; + if (!options.watchfile) return; f = fopen(options.watchfile, "a"); if (!f) return ; fputs(filename, f); --
