Fix for 3777172, crash from nested colgroup. Don't allow nested table sections...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Aug 2004 21:36:31 +0000 (21:36 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 26 Aug 2004 21:36:31 +0000 (21:36 +0000)
        Reviewed by darin

        * khtml/html/htmlparser.cpp:
        (KHTMLParser::insertNode):

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

WebCore/ChangeLog-2005-08-23
WebCore/khtml/html/htmlparser.cpp

index c7b28f01f4241b3279ee05ea34f448cd31565a04..25d5df4c2d9ce29fc0ef5f0c9324ff348d56fd17 100644 (file)
@@ -1,3 +1,12 @@
+2004-08-26  David Hyatt  <hyatt@apple.com>
+
+       Fix for 3777172, crash from nested colgroup.  Don't allow nested table sections or col groups.
+       
+        Reviewed by darin
+
+        * khtml/html/htmlparser.cpp:
+        (KHTMLParser::insertNode):
+
 2004-08-26  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Hyatt
index bd8c28d88c044b28d8cb1802cfd5b7be7643df16..b457d7838551edc41c247fed1925b6c02d0ca7a5 100644 (file)
@@ -533,6 +533,16 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat)
             }
             break;
         }
+        case ID_THEAD:
+        case ID_TBODY:
+        case ID_TFOOT:
+        case ID_COLGROUP: {
+            if (current->id() == ID_THEAD || current->id() == ID_TBODY || current->id() == ID_TFOOT ||
+                current->id() == ID_COLGROUP) {
+                popOneBlock();
+                return insertNode(n);
+            }
+        }
         default:
             break;
         }