]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
locale_facets.tcc (num_get::_M_extract_int): Fix bounds error in handling of hex...
authorRichard Sandiford <rsandifo@redhat.com>
Tue, 24 Feb 2004 20:49:40 +0000 (20:49 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Tue, 24 Feb 2004 20:49:40 +0000 (20:49 +0000)
* include/bits/locale_facets.tcc (num_get::_M_extract_int): Fix bounds
error in handling of hex constants.

From-SVN: r78385

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/locale_facets.tcc

index 975ae639fdf3083469ec9c0e005f5f3c8f731f1f..2b87092a3be3cd0e334ddfd4e4ecaeb563aa74fd 100644 (file)
@@ -1,3 +1,8 @@
+2004-02-24  Richard Sandiford  <rsandifo@redhat.com>
+
+       * include/bits/locale_facets.tcc (num_get::_M_extract_int): Fix bounds
+       error in handling of hex constants.
+
 2004-02-24  Paolo Carlini  <pcarlini@suse.de>
 
        * include/bits/locale_facets.tcc (money_put<>::_M_insert):
index cf01602ee381d8dad7f929a8a196de0fc986b4b7..c9e1e7f1ec52dcc3a7d19f3e6046f7fd1da2e6a3 100644 (file)
@@ -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;