forked from enlightenment/efl
fopen can fail. check file is open before trying to write to it.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
62401c257a
commit
42496ac4ea
|
@ -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 "
|
||||
|
|
Loading…
Reference in New Issue