From c28de5a4ca45ed1d78ae2e3d610175cf7752703c Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 18 May 2006 08:38:41 +0000 Subject: 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] --- bk_whlp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bk_whlp.c') 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; /* -- cgit v1.1