[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/filters/kword/mswrite
From:       Clarence Dang <dang () kde ! org>
Date:       2003-06-29 8:57:27
[Download RAW message or body]

CVS commit by dang: 


protect against corrupted files and div by 0


  M +7 -2      mswriteexport.cc   1.14


--- koffice/filters/kword/mswrite/mswriteexport.cc  #1.13:1.14
@@ -1064,4 +1064,9 @@ public:
                                                 // convert twip measurements that \
                aren't in 72dpi
                                                 int defaultDpi = wmf.defaultDpi ();
+                                                if (defaultDpi <= 0)
+                                                {
+                                                        kdWarning (30509) << \
"Invalid defaultDPI: " << defaultDpi << endl; +                                       \
defaultDpi = 1440; +                                                }
                                                 imageActualWidth = width * 1440 / \
                defaultDpi;
                                                 imageActualHeight = height * 1440 / \
defaultDpi;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic