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

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:43:47 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit b5a473fb45e6cb0c1f601923fc7063d6134b9a76
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 24 17:48:06 2002 +0000

    	- fixed 3056579 -- various crashes at http://www.auspost.com.au/
    
    	Apparently the strings at this site were just the right length to expose a bug
    	in our QString implementation, one that I probably introduced when fixing 3032072.
    	One nice thing about this is that getting this correct could also result in a
    	little bit of a speedup, as the internal buffer is used more.
    
            * kwq/KWQString.mm:
            (QStringData::makeAscii): Set _maxAscii to QS_INTERNAL_BUFFER_CHARS when using
    	the internal buffer instead of leaving it uninitialized.
            (QStringData::makeUnicode): Same for _maxUnicode.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2141 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 397763c..4a9f0d4 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,5 +1,19 @@
 2002-09-24  Darin Adler  <darin at apple.com>
 
+	- fixed 3056579 -- various crashes at http://www.auspost.com.au/
+
+	Apparently the strings at this site were just the right length to expose a bug
+	in our QString implementation, one that I probably introduced when fixing 3032072.
+	One nice thing about this is that getting this correct could also result in a
+	little bit of a speedup, as the internal buffer is used more.
+
+        * kwq/KWQString.mm:
+        (QStringData::makeAscii): Set _maxAscii to QS_INTERNAL_BUFFER_CHARS when using
+	the internal buffer instead of leaving it uninitialized.
+        (QStringData::makeUnicode): Same for _maxUnicode.
+
+2002-09-24  Darin Adler  <darin at apple.com>
+
 	Remove the focus border hack, which was no longer doing us any good.
 
         * kwq/KWQNSTextField.h: Don't define FOCUS_BORDER_SIZE.
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 397763c..4a9f0d4 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,5 +1,19 @@
 2002-09-24  Darin Adler  <darin at apple.com>
 
+	- fixed 3056579 -- various crashes at http://www.auspost.com.au/
+
+	Apparently the strings at this site were just the right length to expose a bug
+	in our QString implementation, one that I probably introduced when fixing 3032072.
+	One nice thing about this is that getting this correct could also result in a
+	little bit of a speedup, as the internal buffer is used more.
+
+        * kwq/KWQString.mm:
+        (QStringData::makeAscii): Set _maxAscii to QS_INTERNAL_BUFFER_CHARS when using
+	the internal buffer instead of leaving it uninitialized.
+        (QStringData::makeUnicode): Same for _maxUnicode.
+
+2002-09-24  Darin Adler  <darin at apple.com>
+
 	Remove the focus border hack, which was no longer doing us any good.
 
         * kwq/KWQNSTextField.h: Don't define FOCUS_BORDER_SIZE.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 397763c..4a9f0d4 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,19 @@
 2002-09-24  Darin Adler  <darin at apple.com>
 
+	- fixed 3056579 -- various crashes at http://www.auspost.com.au/
+
+	Apparently the strings at this site were just the right length to expose a bug
+	in our QString implementation, one that I probably introduced when fixing 3032072.
+	One nice thing about this is that getting this correct could also result in a
+	little bit of a speedup, as the internal buffer is used more.
+
+        * kwq/KWQString.mm:
+        (QStringData::makeAscii): Set _maxAscii to QS_INTERNAL_BUFFER_CHARS when using
+	the internal buffer instead of leaving it uninitialized.
+        (QStringData::makeUnicode): Same for _maxUnicode.
+
+2002-09-24  Darin Adler  <darin at apple.com>
+
 	Remove the focus border hack, which was no longer doing us any good.
 
         * kwq/KWQNSTextField.h: Don't define FOCUS_BORDER_SIZE.
diff --git a/WebCore/kwq/KWQString.mm b/WebCore/kwq/KWQString.mm
index 5ef3fae..864d31a 100644
--- a/WebCore/kwq/KWQString.mm
+++ b/WebCore/kwq/KWQString.mm
@@ -313,6 +313,7 @@ void QStringData::initialize()
 QStringData::QStringData(QChar *u, uint l, uint m) :
 	refCount(1), _length(l), _unicode(u), _ascii(0), _maxUnicode(m), _isUnicodeInternal(0), _isUnicodeValid(1), _isHeapAllocated(0), _maxAscii(QS_INTERNAL_BUFFER_CHARS), _isAsciiInternal(0), _isAsciiValid(0)
 {
+    ASSERT(m >= l);
 #ifdef QSTRING_DEBUG_ALLOCATIONS
     stringDataInstances++;
 #endif
@@ -321,6 +322,7 @@ QStringData::QStringData(QChar *u, uint l, uint m) :
 // Don't copy data.
 void QStringData::initialize(QChar *u, uint l, uint m)
 {
+    ASSERT(m >= l);
     refCount = 1;
     _length = l;
     _unicode = u;
@@ -528,6 +530,7 @@ inline QChar *QStringData::unicode()
 
 void QStringData::increaseUnicodeSize(uint size)
 {
+    ASSERT(size > _length);
     ASSERT(this != QString::shared_null);
         
     uint newSize = (uint)ALLOC_QCHAR_GOOD_SIZE(size);
@@ -587,6 +590,7 @@ char *QStringData::makeAscii()
             else
                 str = _unicode;
             _ascii = (char *)&_internalBuffer[0];
+            _maxAscii = QS_INTERNAL_BUFFER_CHARS;
             _isAsciiInternal = 1;
         }
         else {
@@ -635,6 +639,7 @@ QChar *QStringData::makeUnicode()
             else
                 str = _ascii;
             _unicode = (QChar *)&_internalBuffer[0];
+            _maxUnicode = QS_INTERNAL_BUFFER_UCHARS;
             _isUnicodeInternal = 1;
         }
         else {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list