summaryrefslogtreecommitdiff
path: root/bk_whlp.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2006-05-18 08:38:41 +0000
committerSimon Tatham <anakin@pobox.com>2006-05-18 08:38:41 +0000
commitc28de5a4ca45ed1d78ae2e3d610175cf7752703c (patch)
tree50254fba926c3ab59c63fe3f969bc63b538bda6e /bk_whlp.c
parent8916e612525cfa56a57fe8f8144112c5b8fbb9e3 (diff)
downloadhalibut-c28de5a4ca45ed1d78ae2e3d610175cf7752703c.zip
halibut-c28de5a4ca45ed1d78ae2e3d610175cf7752703c.tar.gz
halibut-c28de5a4ca45ed1d78ae2e3d610175cf7752703c.tar.bz2
halibut-c28de5a4ca45ed1d78ae2e3d610175cf7752703c.tar.xz
Missing error handling: the HTML and WinHelp back ends would both
segfault if they were unable to open their output files. [originally from svn r6704]
Diffstat (limited to 'bk_whlp.c')
-rw-r--r--bk_whlp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bk_whlp.c b/bk_whlp.c
index 9772021..14e6b01 100644
--- a/bk_whlp.c
+++ b/bk_whlp.c
@@ -212,6 +212,10 @@ void whlp_backend(paragraph *sourceform, keywordlist *keywords,
}
state.cntfp = fopen(cntname, "wb");
+ if (!state.cntfp) {
+ error(err_cantopenw, cntname);
+ return;
+ }
state.cnt_last_level = -1; state.cnt_workaround = 0;
/*