devilhorns pushed a commit to branch master.
commit 42496ac4ea0413af0415b239bd76c88a75948c26
Author: Chris Michael <[email protected]>
Date: Mon Aug 5 10:41:16 2013 +0100
fopen can fail. check file is open before trying to write to it.
Signed-off-by: Chris Michael <[email protected]>
---
src/bin/edje/edje_decc.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/bin/edje/edje_decc.c b/src/bin/edje/edje_decc.c
index 774885d..2065d90 100644
--- a/src/bin/edje/edje_decc.c
+++ b/src/bin/edje/edje_decc.c
@@ -438,10 +438,13 @@ output(void)
ERR("potential security violation. attempt to write in parent
dir.");
exit (-1);
}
- f = fopen(out, "wb");
- fprintf(f, "#!/bin/sh\n");
- fprintf(f, "%s $@ -id . -fd . %s -o %s.edj\n",
edje_file->compiler, sf->name, outdir);
- fclose(f);
+ if ((f = fopen(out, "wb")))
+ {
+ fprintf(f, "#!/bin/sh\n");
+ fprintf(f, "%s $@ -id . -fd . %s -o %s.edj\n",
+ edje_file->compiler, sf->name, outdir);
+ fclose(f);
+ }
WRN("*** CAUTION ***\n"
"Please check the build script for anything malicious "
--
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk