[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address XXX comment at lines 987-990 in bashfile.c

From: Bill Parker
Subject: Re: address XXX comment at lines 987-990 in bashfile.c
Date: Sat, 11 Jul 2015 13:15:11 -0700

The comment above the line would seem to indicate otherwise:

Here is the comment:

   /* Now erase the contents of the current line and undo the effects of the
      rl_accept_line() above.  We don't even want to make the text we just
      executed available for undoing. */


On Fri, Jul 10, 2015 at 11:30 PM, Eduardo A. Bustamante López <address@hidden> wrote:
On Thu, Jul 09, 2015 at 01:53:52PM -0700, Bill Parker wrote:
> Hello All,
>    In reviewing the code at line 990 in bashfile.c, while the
> issue of rl_line_buffer[0] = '\0', would it not be better to
> use memset(rl_line_buffer, '\0', sizeof(rl_line_buffer)) to
> clobber the entire line more effectively?  The patch file
> below addresses this issue:

I don't think the intention of that line is to clear the whole buffer. If that
buffer is to hold a C string, then the current code is sufficient to make that
a 'null' string.

Eduardo Bustamante

reply via email to

[Prev in Thread] Current Thread [Next in Thread]