[tracker] Avoid crash in ttlresource2sgml.c on invalid output path
- From: Sam Thursfield <sthursfield src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Avoid crash in ttlresource2sgml.c on invalid output path
- Date: Sat, 11 Mar 2017 15:50:34 +0000 (UTC)
commit 48330f7fbedc44e4ce527e15956367a5bb98d252
Author: Sam Thursfield <sam afuera me uk>
Date: Sun Feb 26 22:42:00 2017 +0000
Avoid crash in ttlresource2sgml.c on invalid output path
docs/tools/ttlresource2sgml.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/docs/tools/ttlresource2sgml.c b/docs/tools/ttlresource2sgml.c
index ae91882..9a24b57 100644
--- a/docs/tools/ttlresource2sgml.c
+++ b/docs/tools/ttlresource2sgml.c
@@ -781,6 +781,11 @@ generate_ontology_class_docs (Ontology *ontology,
output_file = g_build_filename (output_dir, class_filename, NULL);
f = fopen (output_file, "w");
+
+ if (f == NULL) {
+ g_error ("Could not open %s for writing.\n", output_file);
+ }
+
g_free (class_filename);
g_free (output_file);
g_free (shortname);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]