[poppler] utils/HtmlOutputDev.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Jan 10 14:52:05 PST 2008


 utils/HtmlOutputDev.cc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 88f8bf850b6c41d25b9576597b5fc5bd75a122f4
Author: Kjartan Maraas <kmaraas at gnome.org>
Date:   Thu Jan 10 23:51:54 2008 +0100

    Fix two use after free bugs in HtmlOutputDev.cc

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 9a33050..1fe960f 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -820,8 +820,8 @@ void HtmlOutputDev::doFrame(int firstPage){
   fName->append(".html");
 
   if (!(fContentsFrame = fopen(fName->getCString(), "w"))){
-    delete fName;
     error(-1, "Couldn't open html file '%s'", fName->getCString());
+    delete fName;
     return;
   }
   
@@ -934,8 +934,8 @@ HtmlOutputDev::HtmlOutputDev(char *fileName, char *title,
       if (!xml) right->append(".html");
       if (xml) right->append(".xml");
       if (!(page=fopen(right->getCString(),"w"))){
-	delete right;
 	error(-1, "Couldn't open html file '%s'", right->getCString());
+	delete right;
 	return;
       }  
       delete right;


More information about the poppler mailing list