[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

aroben at apple.com aroben at apple.com
Fri Jan 21 15:17:56 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit b39c294c86975b0de42fef353089b205ce4d0405
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Jan 10 22:02:58 2011 +0000

    Don't pass a reference type to va_start
    
    C++ says this results in undefined behavior:
    
        The restrictions that ISO C places on the second parameter to the
        va_start() macro in header <stdarg.h> are different in this
        International Standard. The parameter parmN is the identifier of
        the rightmost parameter in the variable parameter list of the
        function definition (the one just before the ...).221) If the
        parameter parmN is declared with a function, array, or reference
        type, or with a type that is not compatible with the type that
        results when passing an argument for which there is no parameter,
        the behavior is undefined.
    
    Fixes <http://webkit.org/b/52168> Title of standalone image document
    includes bogus image dimensions
    
    Rubber-stamped by Eric Seidel.
    
    * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
    (WebKit::formatLocalizedString): Don't use a reference type for
    |format|.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75435 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index f886855..963274c 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,28 @@
+2011-01-10  Adam Roben  <aroben at apple.com>
+
+        Don't pass a reference type to va_start
+
+        C++ says this results in undefined behavior:
+
+            The restrictions that ISO C places on the second parameter to the
+            va_start() macro in header <stdarg.h> are different in this
+            International Standard. The parameter parmN is the identifier of
+            the rightmost parameter in the variable parameter list of the
+            function definition (the one just before the ...).221) If the
+            parameter parmN is declared with a function, array, or reference
+            type, or with a type that is not compatible with the type that
+            results when passing an argument for which there is no parameter,
+            the behavior is undefined.
+
+        Fixes <http://webkit.org/b/52168> Title of standalone image document
+        includes bogus image dimensions
+
+        Rubber-stamped by Eric Seidel.
+
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
+        (WebKit::formatLocalizedString): Don't use a reference type for
+        |format|.
+
 2011-01-10  Siddharth Mathur  <siddharth.mathur at nokia.com>
 
         Reviewed by Eric Seidel.
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp b/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
index 1730613..67fa3aa 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
@@ -52,7 +52,9 @@ namespace WebKit {
 // We can't use String::format for two reasons:
 //  1) It doesn't handle non-ASCII characters in the format string.
 //  2) It doesn't handle the %2$d syntax.
-static String formatLocalizedString(const String& format, ...)
+// Note that because |format| is used as the second paramter to va_start, it cannot be a reference
+// type according to section 18.7/3 of the C++ N1905 standard.
+static String formatLocalizedString(String format, ...)
 {
 #if PLATFORM(CF)
     va_list arguments;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list