From: Richard Sandiford Date: Tue, 24 Feb 2004 20:49:40 +0000 (+0000) Subject: locale_facets.tcc (num_get::_M_extract_int): Fix bounds error in handling of hex... X-Git-Tag: releases/gcc-4.0.0~9877 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=212063a8446bfacef005a5060d7d316a763a7862;p=thirdparty%2Fgcc.git locale_facets.tcc (num_get::_M_extract_int): Fix bounds error in handling of hex constants. * include/bits/locale_facets.tcc (num_get::_M_extract_int): Fix bounds error in handling of hex constants. From-SVN: r78385 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 975ae639fdf3..2b87092a3be3 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2004-02-24 Richard Sandiford + + * include/bits/locale_facets.tcc (num_get::_M_extract_int): Fix bounds + error in handling of hex constants. + 2004-02-24 Paolo Carlini * include/bits/locale_facets.tcc (money_put<>::_M_insert): diff --git a/libstdc++-v3/include/bits/locale_facets.tcc b/libstdc++-v3/include/bits/locale_facets.tcc index cf01602ee381..c9e1e7f1ec52 100644 --- a/libstdc++-v3/include/bits/locale_facets.tcc +++ b/libstdc++-v3/include/bits/locale_facets.tcc @@ -391,7 +391,7 @@ namespace std // At this point, base is determined. If not hex, only allow // base digits as valid input. - const size_t __len = __base == 16 ? _S_iend : __base; + const size_t __len = __base == 16 ? _S_iend - _S_izero : __base; // Extract. string __found_grouping;