components/stdcxx/patches/065-6889785-string.patch
author Rich Burridge <rich.burridge@oracle.com>
Fri, 06 Feb 2015 12:30:31 -0800
changeset 3744 a74b6fa1af7a
parent 402 94ae4d75524c
permissions -rw-r--r--
20455804 TWISTED should have some master test results to compare against 20471207 doc/testing.txt should advise removing build output from the master results
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
402
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     1
--- stdcxx-4.2.1/include/string	2011-01-07 11:48:23.120751627 -0500
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     2
+++ stdcxx-4.2.1/include/string	2011-01-07 11:34:30.231689924 -0500
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     3
@@ -874,7 +874,6 @@
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     4
     pointer _C_data;
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     5
 };
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     6
 
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     7
-
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     8
 typedef basic_string<char, char_traits<char>, allocator<char> > string;
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     9
 
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    10
 #ifndef _RWSTD_NO_WCHAR_T
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    11
@@ -884,7 +883,6 @@
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    12
 
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    13
 #endif   // _RWSTD_NO_WCHAR_T
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    14
 
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    15
-
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    16
 template <class _CharT, class _Traits , class _Allocator>
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    17
 
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    18
 #if    !defined (__GNUG__)                  \
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    19
@@ -1228,6 +1226,13 @@
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    20
 append (const_pointer __s, size_type __n)
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    21
 {
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    22
     const size_type __size0 = size ();
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    23
+
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    24
+	_RWSTD_REQUIRES (__n < (max_size() - __size0),
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    25
+					(_RWSTD_ERROR_LENGTH_ERROR,
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    26
+					_RWSTD_FUNC ("basic_string::append(const_pointer,"
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    27
+							" size_type)"),
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    28
+					 __n, max_size() - __size0));
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    29
+
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    30
     const _RWSTD_SIZE_T __size1 = __size0 + __n;
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    31
 
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    32
     if (   capacity () <= __size1
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    33
@@ -1248,6 +1253,13 @@
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    34
 append (size_type __n, value_type __c)
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    35
 {
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    36
     const size_type __size0 = size ();
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    37
+
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    38
+	_RWSTD_REQUIRES (__n < (max_size() - __size0),
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    39
+					(_RWSTD_ERROR_LENGTH_ERROR,
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    40
+					_RWSTD_FUNC ("basic_string::append(size_type,"
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    41
+							" value_type)"),
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    42
+					__n, max_size() - __size0));
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    43
+
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    44
     const _RWSTD_SIZE_T __size1 = __size0 + __n;
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    45
 
94ae4d75524c 7064836 stdcxx to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    46
     if (   capacity () < __size1