From: Sven Baars sbaars@codeweavers.com
--- tools/makedep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/makedep.c b/tools/makedep.c index 3fe2d254fdf..2cb1b806882 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -527,7 +527,7 @@ static const char *get_root_relative_path( struct makefile *make ) } ret = xmalloc( 3 * dotdots ); for (p = ret; dotdots; dotdots--, p += 3) memcpy( p, "../", 3 ); - p[-1] = 0; /* remove trailing slash */ + if (dotdots) p[-1] = 0; /* remove trailing slash */ return ret; }
This can't happen, so maybe an assert would be preferable.