[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: * info/util.c (text_buffer_iconv): Correctly upda
From: |
Gavin D. Smith |
Subject: |
branch master 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:45:37 -0500 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 9a83ffc3d7 * 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>.
9a83ffc3d7 is described below
commit 9a83ffc3d71182ca805504644d3881dae11b205f
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 82fb76a8a2..f49e22784b 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-12 Patrice Dumas <pertusus@free.fr>
* tp/t/converters_tests.t: in form_feeds test, add more form feeds for
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 master 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 <=