[poppler] Branch 'poppler-0.6' - utils/HtmlOutputDev.cc

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


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

New commits:
commit cd00607c534bf23051d411e182a84be2fd658616
Author: Kjartan Maraas <kmaraas at gnome.org>
Date:   Thu Jan 10 23:49:02 2008 +0100

    Fix two use after free bugs in HtmlOutputDev.cc

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index f88ffb0..50c0771 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -818,8 +818,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;
   }
   
@@ -932,8 +932,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