bug-bash
[Top][All Lists]
Advanced

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

Re: String corruption using \W in prompt


From: Andreas Schwab
Subject: Re: String corruption using \W in prompt
Date: Fri, 28 May 2010 16:13:44 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Stéphane Jourdois <sjourdois@gmail.com> writes:

> --- parse.y     2010-05-27 15:16:15.623495000 +0200
> +++ parse.y.smj 2010-05-27 15:16:30.364495000 +0200
> @@ -5152,7 +5152,7 @@
>                       {
>                         t = strrchr (t_string, '/');
>                         if (t)
> -                         strcpy (t_string, t + 1);
> +                         memmove (t_string, t + 1, sizeof(t));

Surely you want strlen.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

reply via email to

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