components/stdcxx/patches/090-7088072-string.cc.patch
branchs11-sru
changeset 2228 5d1080eeaaee
equal deleted inserted replaced
2227:972345a3c215 2228:5d1080eeaaee
       
     1 # Patch for CR 7088072 and 7088065
       
     2 --- stdcxx-4.2.1/include/string.cc	2011-07-10 13:09:53.630466602 -0700
       
     3 +++ stdcxx-4.2.1/include/string.cc	2011-09-10 13:20:30.199451960 -0700
       
     4 @@ -415,6 +415,12 @@
       
     5                                     "size_type, size_type, value_type)"), 
       
     6                        __size0 - __xlen, max_size () - __count));
       
     7  
       
     8 +    _RWSTD_REQUIRES (__count < (max_size () - __pos),
       
     9 +                     (_RWSTD_ERROR_LENGTH_ERROR,
       
    10 +                      _RWSTD_FUNC ("basic_string::replace (size_type, "
       
    11 +                                   "size_type, size_type, value_type)"), 
       
    12 +                      __count, (max_size () - __pos)));
       
    13 +
       
    14      // compute the resulting string size
       
    15      const size_type __size1 = __size0 - __xlen + __count;
       
    16