]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
manual: Document that iconv buffers may not overlap
authorFlorian Weimer <fweimer@redhat.com>
Mon, 2 Feb 2026 14:20:57 +0000 (15:20 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 2 Feb 2026 14:20:57 +0000 (15:20 +0100)
As discussed here:

  Re: [bug-gnu-libiconv] iconv and overlapping input/output buffers
  <https://lists.gnu.org/archive/html/bug-gnu-libiconv/2026-01/msg00002.html>

Reviewed-by: Collin Funk <collin.funk1@gmail.com>
manual/charset.texi

index 3aaa62d088570f76ee152e8bde5104d7cd1746da..b10d0b33c7217aeb4c89952f34ad0722a9ec309b 100644 (file)
@@ -1801,6 +1801,9 @@ pointer again is of type @code{char} and the length is measured in
 bytes.  If @var{outbuf} or @code{*@var{outbuf}} is a null pointer, the
 conversion is performed but no output is available.
 
+The input and output buffers may not have any bytes in common.  If they
+overlap, the behavior is undefined.
+
 If @var{inbuf} is a null pointer, the @code{iconv} function performs the
 necessary action to put the state of the conversion into the initial
 state.  This is obviously a no-op for non-stateful encodings, but if the