On 3/16/17 12:41 AM, Denis Martinez wrote:

> An error occurs because buffer is assumed to be a 0-terminated string,
> however it is not.
> 
> The code which previously reads into buffer does not write the 0 terminator
> after the data. This problem could be solved by writing
> `buffer[chars_read] = 0' in the success path following read().
> 
> Please also note: the MMAP path, which also does not terminate input,
> seems equally fallible given an input whose exact content is the character #.

Thanks for the report.  This looks like a good fix.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    [email protected]    http://cnswww.cns.cwru.edu/~chet/

_______________________________________________
Bug-readline mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-readline

Reply via email to