From aef11c5295a4bea4c3d6baabb9f37e9f7986437b Mon Sep 17 00:00:00 2001 From: discomfitor Date: Sat, 31 Jul 2010 05:24:47 +0000 Subject: [PATCH] verify that fopen succeeded git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@50709 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/bin/edje_decc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bin/edje_decc.c b/src/bin/edje_decc.c index a9c06b5..08870ec 100644 --- a/src/bin/edje_decc.c +++ b/src/bin/edje_decc.c @@ -314,10 +314,11 @@ output(void) ERR("Potential security violation. attempt to write in parent dir."); exit (-1); } - f = fopen(out, "wb"); + if (!(f = fopen(out, "wb"))) + ERR("Could not open file: %s", out); if (fwrite(font, fontsize, 1, f) != 1) ERR("Could not write font: %s", strerror(errno)); - fclose(f); + if (f) fclose(f); free(font); } } -- 2.7.4