rpms/kdegraphics/devel kdegraphics-3.5.4-kde#133910.patch, NONE, 1.1 kdegraphics.spec, 1.93, 1.94

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Sep 12 14:54:32 UTC 2006


Author: than

Update of /cvs/dist/rpms/kdegraphics/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv9470

Modified Files:
	kdegraphics.spec 
Added Files:
	kdegraphics-3.5.4-kde#133910.patch 
Log Message:
fix #133910, Don't crash when trying to open a DVI file that has been only partially written


kdegraphics-3.5.4-kde#133910.patch:
 dviRenderer.cpp |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

--- NEW FILE kdegraphics-3.5.4-kde#133910.patch ---
Index: kdvi/dviRenderer.cpp
===================================================================
--- kdvi/dviRenderer.cpp	(Revision 583402)
+++ kdvi/dviRenderer.cpp	(Revision 583403)
@@ -194,7 +194,7 @@
   // Reset colors
   colorStack.clear();
   globalColor = Qt::black;
-  
+
   QApplication::setOverrideCursor( waitCursor );
   foreGroundPainter = page->getPainter();
   if (foreGroundPainter != 0) {
@@ -203,6 +203,7 @@
     page->returnPainter(foreGroundPainter);
   }
   QApplication::restoreOverrideCursor();
+  
   page->isEmpty = false;
   if (errorMsg.isEmpty() != true) {
     KMessageBox::detailedError(parentWidget,
@@ -455,6 +456,16 @@
     return false;
   }
   
+  // Check if the file is a valid DVI file.
+  if (!isValidFile(filename))
+  {
+    KMessageBox::sorry( parentWidget,
+                        i18n("<qt>File corruption! KDVI had trouble interpreting your DVI file. Most "
+                             "likely this means that the DVI file is broken.</qt>")
+                        .arg( fname ) );
+    return false;
+  }
+
   QApplication::setOverrideCursor( waitCursor );
   dvifile *dviFile_new = new dvifile(filename, &font_pool);
   
@@ -594,7 +605,7 @@
 #ifdef DEBUG_DVIRENDERER
   kdError(4300) << "dviRenderer::parseReference( " << reference << " ) called" << endl;
 #endif
-  
+
   if (dviFile == 0) {
     mutex.unlock();
     return Anchor();


Index: kdegraphics.spec
===================================================================
RCS file: /cvs/dist/rpms/kdegraphics/devel/kdegraphics.spec,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- kdegraphics.spec	7 Sep 2006 16:46:50 -0000	1.93
+++ kdegraphics.spec	12 Sep 2006 14:54:30 -0000	1.94
@@ -35,6 +35,7 @@
 # upstream patches
 Patch100: kdegraphics-3.5.4-kde#113635.patch
 Patch101: kdegraphics-3.5.4-kpdf-crash.patch
+Patch102: kdegraphics-3.5.4-kde#133910.patch
 
 %ifnarch %{no_scanner_archs}
 BuildRequires: sane-backends-devel >= 1.0.3-10
@@ -97,6 +98,7 @@
 # upstream patches
 %patch100 -p0 -b .kde#113635
 %patch101 -p0 -b .kpdf-crash
+%patch102 -p0 -b .kde#133910
 
 %if %{rhel}
   echo "DO_NOT_COMPILE=\"\$DO_NOT_COMPILE kfax\"" >kfax/configure.in.in
@@ -202,9 +204,10 @@
 %{_includedir}/kde/*
 
 %changelog
-* Thu Sep 07 2006 Than Ngo <than at redhat.com> 7:3.5.4-2
+* Tue Sep 12 2006 Than Ngo <than at redhat.com> 7:3.5.4-2
 - apply upstream patches
    fix #113635, kpdf crash
+   fix #133910, Don't crash when trying to open a DVI file that has been only partially written
 
 * Thu Aug 10 2006 Than Ngo <than at redhat.com> 7:3.5.4-1
 - rebuild




More information about the fedora-cvs-commits mailing list