[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch release/7.0 updated: * info/util.c (text_buffer_iconv): Correctly
From: |
Gavin D. Smith |
Subject: |
branch release/7.0 updated: * info/util.c (text_buffer_iconv): Correctly update arguments for iconv in loop. Crash for "info groff" reported by Jakub Wilk via Hilmar Preuße <address@hidden>. |
Date: |
Mon, 12 Dec 2022 13:46:16 -0500 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch release/7.0
in repository texinfo.
The following commit(s) were added to refs/heads/release/7.0 by this push:
new 86185e7ced * info/util.c (text_buffer_iconv): Correctly update
arguments for iconv in loop. Crash for "info groff" reported by Jakub Wilk via
Hilmar Preuße <hille42@web.de>.
86185e7ced is described below
commit 86185e7cedafd011376d0efb6f7e028231dbf641
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Mon Dec 12 18:40:01 2022 +0000
* info/util.c (text_buffer_iconv): Correctly update arguments
for iconv in loop. Crash for "info groff" reported by Jakub Wilk
via Hilmar Preuße <hille42@web.de>.
---
ChangeLog | 6 ++++++
info/util.c | 11 ++++-------
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3a4ebd756d..c960e1ac7a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-12-12 Gavin Smith <gavinsmith0123@gmail.com>
+
+ * info/util.c (text_buffer_iconv): Correctly update arguments
+ for iconv in loop. Crash for "info groff" reported by Jakub Wilk
+ via Hilmar Preuße <hille42@web.de>.
+
2022-12-07 Gavin Smith <gavinsmith0123@gmail.com>
* install-info/install-info.c (error): Declare as static to
diff --git a/info/util.c b/info/util.c
index 10be93bae1..46af4ce385 100644
--- a/info/util.c
+++ b/info/util.c
@@ -350,11 +350,11 @@ text_buffer_iconv (struct text_buffer *buf, iconv_t
iconv_state,
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);
-
while (1)
{
+ outptr = text_buffer_base (buf) + text_buffer_off (buf);
+ out_bytes_left = text_buffer_space_left (buf);
+
iconv_ret = iconv (iconv_state, inbuf, inbytesleft,
&outptr, &out_bytes_left);
if (iconv_ret != (size_t) -1)
@@ -362,10 +362,7 @@ 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, (extra_alloc *= 4));
- out_bytes_left = text_buffer_space_left (buf);
- }
+ text_buffer_alloc (buf, (extra_alloc *= 4));
else
break; /* let calling code deal with it */
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch release/7.0 updated: * info/util.c (text_buffer_iconv): Correctly update arguments for iconv in loop. Crash for "info groff" reported by Jakub Wilk via Hilmar Preuße <address@hidden>.,
Gavin D. Smith <=