On Tue, Feb 12, 2013 at 06:39:07PM -0800, Alan Coopersmith wrote:
> Use memmove for potentially overlapping copies.
> 
> Reported-by: Laurence Jupp <[email protected]>
> Signed-off-by: Alan Coopersmith <[email protected]>

Reviewed-by: Matthieu Herrb <[email protected]>

> ---
>  parse.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/parse.c b/parse.c
> index 2d7c95a..e5240c3 100644
> --- a/parse.c
> +++ b/parse.c
> @@ -229,7 +229,7 @@ deftype (char *line, struct filepointer *filep,
>               /*
>                * copy the definition back to the beginning of the line.
>                */
> -             strcpy (line, p);
> +             memmove (line, p, strlen(p) + 1);
>               break;
>       case ELSE:
>       case ENDIF:
> -- 
> 1.7.9.2
> 
> _______________________________________________
> [email protected]: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel

-- 
Matthieu Herrb
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to