diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | manual/stdio.texi | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 7a1c10620a..da8ea6d06f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2014-04-03 David Svoboda <svoboda@cert.org> + + [BZ #5666] + * manual/stdio.texi (Line-Oriented Input): Document buffer allocation + explicitly. + 2014-04-03 Roland McGrath <roland@hack.frob.com> * elf/dl-unmap-segments.h: New file. diff --git a/manual/stdio.texi b/manual/stdio.texi index a4364f79f9..efdaaadf27 100644 --- a/manual/stdio.texi +++ b/manual/stdio.texi @@ -1298,7 +1298,8 @@ back in @code{*@var{n}}. If you set @code{*@var{lineptr}} to a null pointer, and @code{*@var{n}} to zero, before the call, then @code{getline} allocates the initial -buffer for you by calling @code{malloc}. +buffer for you by calling @code{malloc}. This buffer remains allocated +even if @code{getline} encounters errors and is unable to read any bytes. In either case, when @code{getline} returns, @code{*@var{lineptr}} is a @code{char *} which points to the text of the line. |