[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 08:04:59 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 43d061b760f27f107deced406d6e1afe074e1816
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 27 04:21:15 2003 +0000

            - rolled in some CString changes Harri Porten did on the KDE side
    
            * kjs/ustring.cpp:
            (KJS::CString::CString): Use memcpy instead of strcpy for speed. Fix an off by one error
            in the copy constructor.
            (KJS::CString::operator=): Use memcpy instead of strcpy for speed.
    
            * JavaScriptCorePrefix.h: Add a definition of NULL here that matches the one in Merlot.
            This makes us see warnings that otherwise would be Merlot-only warnings.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@5264 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index bacc0f2..b0a7b14 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1 +1,13 @@
+2003-10-26  Darin Adler  <darin at apple.com>
+
+        - rolled in some CString changes Harri Porten did on the KDE side
+
+        * kjs/ustring.cpp:
+        (KJS::CString::CString): Use memcpy instead of strcpy for speed. Fix an off by one error
+        in the copy constructor.
+        (KJS::CString::operator=): Use memcpy instead of strcpy for speed.
+
+        * JavaScriptCorePrefix.h: Add a definition of NULL here that matches the one in Merlot.
+        This makes us see warnings that otherwise would be Merlot-only warnings.
+
 == Rolled over to ChangeLog-2003-10-25 ==
diff --git a/JavaScriptCore/JavaScriptCorePrefix.h b/JavaScriptCore/JavaScriptCorePrefix.h
index 703a512..4c593a5 100644
--- a/JavaScriptCore/JavaScriptCorePrefix.h
+++ b/JavaScriptCore/JavaScriptCorePrefix.h
@@ -1,5 +1,8 @@
-#include <config.h>
+#ifdef __cplusplus
+#define NULL __null
+#endif
 
+#include <config.h>
 
 #include <assert.h>
 #include <ctype.h>
diff --git a/JavaScriptCore/kjs/ustring.cpp b/JavaScriptCore/kjs/ustring.cpp
index 1922249..8152053 100644
--- a/JavaScriptCore/kjs/ustring.cpp
+++ b/JavaScriptCore/kjs/ustring.cpp
@@ -50,7 +50,7 @@ CString::CString(const char *c)
 {
   length = strlen(c);
   data = new char[length+1];
-  strcpy(data, c);
+  memcpy(data, c, length + 1);
 }
 
 CString::CString(const char *c, int len)
@@ -65,7 +65,7 @@ CString::CString(const CString &b)
 {
   length = b.length;
   data = new char[length+1];
-  memcpy(data, b.data, length);
+  memcpy(data, b.data, length + 1);
 }
 
 CString::~CString()
@@ -96,7 +96,7 @@ CString &CString::operator=(const char *c)
     delete [] data;
   length = strlen(c);
   data = new char[length+1];
-  strcpy(data, c);
+  memcpy(data, c, length + 1);
 
   return *this;
 }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list