From 7c503d3286ce0b562ef075480029338556b306d7 Mon Sep 17 00:00:00 2001 From: Alek Du Date: Mon, 8 Feb 2010 10:40:09 +0800 Subject: [PATCH] pathbased: fix relative path in the extlinux installer Fix a bug in the extlinux installer where the relative path is not found correctly. Signed-off-by: Alek Du Signed-off-by: H. Peter Anvin --- extlinux/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extlinux/main.c b/extlinux/main.c index 2cfb1ea..c28f190 100644 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -386,7 +386,7 @@ int patch_file_and_bootblock(int fd, const char *dir, int devfd) } subpath = strchr(dirpath, '\0'); - while (--subpath > dirpath) { + while (--subpath >= dirpath) { if (*subpath == '/') { *subpath = '\0'; if (lstat(dirpath, &xdst) || dirst.st_dev != xdst.st_dev) { -- 2.7.4