From 2b4fc44ef0a4a2506cb02e1a70ca86f4141bd25f Mon Sep 17 00:00:00 2001 From: Bruno G. Albuquerque Date: Mon, 19 Jul 2010 01:41:31 +0000 Subject: [PATCH] The strcpy() usage would overwrite its own buffer. The behaviour somehow worked in Linux but it seems to have changed in Ubuntu 10.04 x64 and compiling GCC 2 would not work on it. Thanks to Shisui for the investigation and original patch and to Ingo who noticed a simpler way to fix the problem. git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@37574 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- legacy/gcc/texinfo/makeinfo/makeinfo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/legacy/gcc/texinfo/makeinfo/makeinfo.c b/legacy/gcc/texinfo/makeinfo/makeinfo.c index 6e2318c..cd7a1b5 100644 --- a/legacy/gcc/texinfo/makeinfo/makeinfo.c +++ b/legacy/gcc/texinfo/makeinfo/makeinfo.c @@ -1,5 +1,5 @@ /* Makeinfo -- convert Texinfo source files into Info files. - $Id: makeinfo.c,v 1.1 2004/10/28 18:14:10 zooey Exp $ + $Id$ Copyright (C) 1987, 92, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc. @@ -1683,7 +1683,7 @@ { if (!cr_or_whitespace (string[x])) { - strcpy (string, string + x); + memmove(string, string + x, strlen(string + x) + 1); break; } } -- gitore 0.2.2