projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec1ba32
)
epp: avoid to rely on undefined behavior for fopen.
author
Cedric Bail
<cedric.bail@samsung.com>
Tue, 5 Nov 2013 07:28:56 +0000
(16:28 +0900)
committer
Cedric Bail
<cedric.bail@samsung.com>
Tue, 5 Nov 2013 07:28:56 +0000
(16:28 +0900)
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/edje/epp/cpplib.c
patch
|
blob
|
history
diff --git
a/src/bin/edje/epp/cpplib.c
b/src/bin/edje/epp/cpplib.c
index
af65241
..
4314b15
100644
(file)
--- a/
src/bin/edje/epp/cpplib.c
+++ b/
src/bin/edje/epp/cpplib.c
@@
-7448,8
+7448,9
@@
extern cpp_options options;
void
using_file(const char *filename, const char type)
{
- FILE *f;
+ FILE *f
= NULL
;
+ if (!options.watchfile) return;
f = fopen(options.watchfile, "a");
if (!f) return;
if (anotate)