bug-bash
[Top][All Lists]
Advanced

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

Re: strcpy of overlapping memory ranges in prompt expansion


From: Chet Ramey
Subject: Re: strcpy of overlapping memory ranges in prompt expansion
Date: Thu, 04 Jul 2013 17:48:42 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130328 Thunderbird/17.0.5

On 7/3/13 4:06 PM, simon@hitzemann.org wrote:

> Bash Version: 4.2
> Patch Level: 45
> Release Status: release
> 
> Description:
>         When using \w in the prompt and changing the directory outside of HOME
>         bash crashes with an abort trap.
>         strcpy(3) say src and dst must not overlap. OS X 10.9 checks that on
>         runtime and forcefully aborts your code if they do.

Thanks for the report.  This will be fixed in the next release of bash.  If
you choose to use your patch before then, you need to add braces around the
code you added.

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



reply via email to

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