components/stdcxx/patches/090-7088072-string.cc.patch
author Jesse Butler <jesse.butler@oracle.com>
Mon, 17 Oct 2016 16:13:44 -0700
changeset 7119 2f82d964b8be
parent 539 9db7f022d292
permissions -rw-r--r--
24830297 drop unneeded metadata layers from base image
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
539
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     1
# Patch for CR 7088072 and 7088065
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     2
--- stdcxx-4.2.1/include/string.cc	2011-07-10 13:09:53.630466602 -0700
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     3
+++ stdcxx-4.2.1/include/string.cc	2011-09-10 13:20:30.199451960 -0700
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     4
@@ -415,6 +415,12 @@
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     5
                                    "size_type, size_type, value_type)"), 
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     6
                       __size0 - __xlen, max_size () - __count));
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     7
 
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     8
+    _RWSTD_REQUIRES (__count < (max_size () - __pos),
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     9
+                     (_RWSTD_ERROR_LENGTH_ERROR,
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    10
+                      _RWSTD_FUNC ("basic_string::replace (size_type, "
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    11
+                                   "size_type, size_type, value_type)"), 
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    12
+                      __count, (max_size () - __pos)));
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    13
+
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    14
     // compute the resulting string size
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    15
     const size_type __size1 = __size0 - __xlen + __count;
9db7f022d292 7088065 CCVS test fail: no exception thrown for out-of-range string access
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    16