diff options
author | edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-02 00:06:28 +0000 |
---|---|---|
committer | edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-02 00:06:28 +0000 |
commit | 3f21cd58486f504c1969a3fde12289c1be499652 (patch) | |
tree | ceceb964bee7c40e77dd3c6e37fff92ced4cd383 /libcpp | |
parent | b1d4d30469760db45bf837efe1cfb2cb9cd71678 (diff) |
2014-10-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
Jeff Law <law@redhat.com>
* charset.c (convert_no_conversion): Reallocate memory with 25%
headroom.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215785 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 6 | ||||
-rw-r--r-- | libcpp/charset.c | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index 4ad851e705e..3b23708d39a 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,9 @@ +2014-10-02 Bernd Edlinger <bernd.edlinger@hotmail.de> + Jeff Law <law@redhat.com> + + * charset.c (convert_no_conversion): Reallocate memory with 25% + headroom. + 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net> Implement SD-6: SG10 Feature Test Recommendations diff --git a/libcpp/charset.c b/libcpp/charset.c index b766eec8b22..1064f527633 100644 --- a/libcpp/charset.c +++ b/libcpp/charset.c @@ -537,6 +537,7 @@ convert_no_conversion (iconv_t cd ATTRIBUTE_UNUSED, if (to->len + flen > to->asize) { to->asize = to->len + flen; + to->asize += to->asize / 4; to->text = XRESIZEVEC (uchar, to->text, to->asize); } memcpy (to->text + to->len, from, flen); |