[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 08:15:47 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 30586b45e0c4b6cbdd8234fd256da98aec51813b
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 2 23:19:11 2003 +0000

    	Fix for 3497999, null check the text() of RenderTexts to avoid a crash in current().
    
            Reviewed by kocienda
    
            * khtml/rendering/bidi.cpp:
            (khtml::BidiIterator::current):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5667 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index c0e2bf0..f8ce51d 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,12 @@
+2003-12-02  David Hyatt  <hyatt at apple.com>
+
+	Fix for 3497999, null check the text() of RenderTexts to avoid a crash in current().
+	
+        Reviewed by kocienda
+
+        * khtml/rendering/bidi.cpp:
+        (khtml::BidiIterator::current):
+
 2003-12-02  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Darin.
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index 81efac0..f71ebb9 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -336,11 +336,16 @@ inline bool BidiIterator::atEnd() const
 
 const QChar &BidiIterator::current() const
 {
-    if( !obj || !obj->isText()) {
-      static QChar nonBreakingSpace(0xA0);
+    static QChar nonBreakingSpace(0xA0);
+    
+    if (!obj || !obj->isText())
       return nonBreakingSpace;
-    }
-    return static_cast<RenderText *>(obj)->text()[pos];
+    
+    RenderText* text = static_cast<RenderText*>(obj);
+    if (!text->text())
+        return nonBreakingSpace;
+    
+    return text->text()[pos];
 }
 
 inline QChar::Direction BidiIterator::direction() const

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list