+2004-06-28 David Asher <david.asher@cavium.com>
+
+ PR libstdc++/11352
+ * include/bits/locale_facets.tcc (__pad<>::_S_pad): Don't
+ access __olds beyond __oldlen.
+
2004-05-31 Release Manager
* GCC 3.3.4 Released.
const bool __testsign = _Traits::eq(__olds[0], __minus)
|| _Traits::eq(__olds[0], __plus);
- const bool __testhex = _Traits::eq(__ctype.widen('0'), __olds[0])
- && (_Traits::eq(__ctype.widen('x'), __olds[1])
- || _Traits::eq(__ctype.widen('X'), __olds[1]));
+ const bool __testhex = (_Traits::eq(__ctype.widen('0'), __olds[0])
+ && __oldlen > 1
+ && (_Traits::eq(__ctype.widen('x'), __olds[1])
+ || _Traits::eq(__ctype.widen('X'),
+ __olds[1])));
if (__testhex)
{
__news[0] = __olds[0];