Reviewed by John
authorkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jan 2005 18:55:53 +0000 (18:55 +0000)
committerkocienda <kocienda@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 21 Jan 2005 18:55:53 +0000 (18:55 +0000)
        Fix for this bug:

        <rdar://problem/3957204> Mail crashed when sending a message in ~InsertParagraphSeparatorInQuotedContentCommand

        * khtml/editing/htmlediting.cpp:
        (khtml::InsertParagraphSeparatorInQuotedContentCommand::InsertParagraphSeparatorInQuotedContentCommand):
        InsertParagraphSeparatorInQuotedContentCommand has this member variable: DOM::ElementImpl *m_breakNode;
        I failed to initialize this variable to null in the constructor, and there is an uncommonly-traveled
        code path which does not set this variable to something good. In the destructor, we check for null,
        and deref if non-null. Obvious "BOOM" potential. Fixed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@8426 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/editing/htmlediting.cpp

index 0a5b14f..d23c5f5 100644 (file)
@@ -4,6 +4,21 @@
 
         Fix for this bug:
         
+        <rdar://problem/3957204> Mail crashed when sending a message in ~InsertParagraphSeparatorInQuotedContentCommand
+
+        * khtml/editing/htmlediting.cpp:
+        (khtml::InsertParagraphSeparatorInQuotedContentCommand::InsertParagraphSeparatorInQuotedContentCommand):
+        InsertParagraphSeparatorInQuotedContentCommand has this member variable: DOM::ElementImpl *m_breakNode;
+        I failed to initialize this variable to null in the constructor, and there is an uncommonly-traveled 
+        code path which does not set this variable to something good. In the destructor, we check for null, 
+        and deref if non-null. Obvious "BOOM" potential. Fixed.
+
+2005-01-21  Ken Kocienda  <kocienda@apple.com>
+
+        Reviewed by John
+
+        Fix for this bug:
+        
         <rdar://problem/3966311> REGRESSION (Mail): Hitting return makes space character disappear
 
         * khtml/editing/htmlediting.cpp:
index b5bcecb..b56993c 100644 (file)
@@ -2771,7 +2771,7 @@ void InsertParagraphSeparatorCommand::doApply()
 // InsertParagraphSeparatorInQuotedContentCommand
 
 InsertParagraphSeparatorInQuotedContentCommand::InsertParagraphSeparatorInQuotedContentCommand(DocumentImpl *document)
-    : CompositeEditCommand(document)
+    : CompositeEditCommand(document), m_breakNode(0)
 {
 }