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: Stéphane Jourdois
Subject: Re: String corruption using \W in prompt
Date: Fri, 28 May 2010 16:06:18 +0000

Of course, typo when doing the patch, sorry !
------Message d'origine------
De: Andreas Schwab
À: Stéphane Jourdois
Cc: bug-bash@gnu.org
Cc: bash@packages.debian.org
Objet: Re: String corruption using \W in prompt
Envoyé: 28 mai 2010 16:13

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."


-- 
///  Stephane Jourdois     /"\  ASCII RIBBON CAMPAIGN \\\
(((    Consultant securite  \ /    AGAINST HTML MAIL    )))
 \\\   157 Bd Davout         X                         ///
  \\\  75020  Paris         / \    +33 6 8643 3085    ///

reply via email to

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