[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

cwzwarich at webkit.org cwzwarich at webkit.org
Mon Feb 21 00:19:58 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit 317e78180fad2aaea79ebf96a7a0509cc37e7624
Author: cwzwarich at webkit.org <cwzwarich at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Jan 29 20:31:29 2011 +0000

    Bug 53374 - Remove uses of unsafe string functions in debugging code
    https://bugs.webkit.org/show_bug.cgi?id=53374
    
    Reviewed by David Kilzer.
    
    * runtime/RegExp.cpp:
    (JSC::RegExp::printTraceData):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@77067 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog
index a9d0d06..8a6fc27 100644
--- a/Source/JavaScriptCore/ChangeLog
+++ b/Source/JavaScriptCore/ChangeLog
@@ -1,5 +1,15 @@
 2011-01-29  Cameron Zwarich  <zwarich at apple.com>
 
+        Reviewed by David Kilzer.
+
+        Bug 53374 - Remove uses of unsafe string functions in debugging code
+        https://bugs.webkit.org/show_bug.cgi?id=53374
+
+        * runtime/RegExp.cpp:
+        (JSC::RegExp::printTraceData):
+
+2011-01-29  Cameron Zwarich  <zwarich at apple.com>
+
         Reviewed by Oliver Hunt.
 
         JavaScriptCoreUseJIT environment variable broken
diff --git a/Source/JavaScriptCore/runtime/RegExp.cpp b/Source/JavaScriptCore/runtime/RegExp.cpp
index 31a1abe..ee2f0bb 100644
--- a/Source/JavaScriptCore/runtime/RegExp.cpp
+++ b/Source/JavaScriptCore/runtime/RegExp.cpp
@@ -230,11 +230,12 @@ void RegExp::matchCompareWithInterpreter(const UString& s, int startOffset, int*
 #if ENABLE(YARR_JIT)
         Yarr::YarrCodeBlock& codeBlock = m_representation->m_regExpJITCode;
 
-        char jitAddr[20];
+        const size_t jitAddrSize = 20;
+        char jitAddr[jitAddrSize];
         if (m_state == JITCode)
-            sprintf(jitAddr, "fallback");
+            snprintf(jitAddr, jitAddrSize, "fallback");
         else
-            sprintf(jitAddr, "0x%014lx", reinterpret_cast<unsigned long int>(codeBlock.getAddr()));
+            snprintf(jitAddr, jitAddrSize, "0x%014lx", reinterpret_cast<unsigned long int>(codeBlock.getAddr()));
 #else
         const char* jitAddr = "JIT Off";
 #endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list