diff options
author | Norbert Preining <norbert@preining.info> | 2022-12-02 03:04:31 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-12-02 03:04:31 +0000 |
commit | 42cda2ed3fa7472e6c064fdbf998d636556343db (patch) | |
tree | 0995420f9b6b31ad8bef5b0e61f35bc7338bab42 /macros/texinfo/texinfo/info | |
parent | 77362f5f4b083c21c2044b0c54d228da42804c72 (diff) |
CTAN sync 202212020304
Diffstat (limited to 'macros/texinfo/texinfo/info')
-rw-r--r-- | macros/texinfo/texinfo/info/util.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/macros/texinfo/texinfo/info/util.c b/macros/texinfo/texinfo/info/util.c index d07262d19b..10be93bae1 100644 --- a/macros/texinfo/texinfo/info/util.c +++ b/macros/texinfo/texinfo/info/util.c @@ -348,6 +348,7 @@ text_buffer_iconv (struct text_buffer *buf, iconv_t iconv_state, size_t out_bytes_left; char *outptr; size_t iconv_ret; + size_t extra_alloc = 1; outptr = text_buffer_base (buf) + text_buffer_off (buf); out_bytes_left = text_buffer_space_left (buf); @@ -361,7 +362,10 @@ text_buffer_iconv (struct text_buffer *buf, iconv_t iconv_state, /* If we ran out of space, allocate more and try again. */ if (errno == E2BIG) - text_buffer_alloc (buf, 4); + { + text_buffer_alloc (buf, (extra_alloc *= 4)); + out_bytes_left = text_buffer_space_left (buf); + } else break; /* let calling code deal with it */ } |