Greetings:
Yesterday, I encountered a segmentation fault when using the "fc"
builtin command. I cloned the Bash source code from GNU Savannah, and I
verified that the bug is still present in the latest commits to the
master and devel branches (the work below applies to "devel").
To reproduce...
Greetings:
After sending the original email concerning this issue, I delved into
the code again for one last review. I discovered that, even after the
original fix a segmentation fault is still possible, because histbeg
could be higher than histend! The idea from "fc" would be to print the
list
On 5/5/20 9:21 AM, Franklin, Jason wrote:
> Greetings:
>
> Yesterday, I encountered a segmentation fault when using the "fc"
> builtin command. I cloned the Bash source code from GNU Savannah, and I
> verified that the bug is still present in the latest commits to the
> master and devel branches
On 5/5/20 11:41 AM, Chet Ramey wrote:
> Thanks for the report and your careful analysis.
>
>>
>> Allow me to explain the reasoning behind the patch...
>>
>> From the CHANGES file, we see this note concerning the "fc" builtin:
>>
>> b. The fc builtin now interprets -0 as the current command line
On 5/5/20 12:16 PM, Franklin, Jason wrote:
> Agreed. This is an undocumented feature, which is why Brandon and I had
> a bit of trouble figuring out what "should" happen. :/
>
>> I'm leaning towards making 0 and -0 out-of-range errors for the non-listing
>> case. This is what other shells do (th