This is on top of the original "sanitary_path_copy()" patch to fix the case where the user gives `pwd`/foobar (or just `pwd`) to us. After making sure the leading part matches with the work tree, we need to strip that to make the result relative to the work tree. setup.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/setup.c b/setup.c index 156d417..0688e7b 100644 --- a/setup.c +++ b/setup.c @@ -110,6 +110,9 @@ const char *prefix_path(const char *prefix, int len, const char *path) free(sanitized); return NULL; } + sanitized += len; + if (*sanitized == '/') + sanitized++; } return sanitized; } @@ -201,6 +204,8 @@ const char **get_pathspec(const char *prefix, const char **pathspec) src++; } *dst = NULL; + if (!*pathspec) + return NULL; return pathspec; } - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Eric Paris | TALPA - a threat model? well sorta. |
| Vladislav Bolkhovitin | Re: Integration of SCST in the mainstream Linux kernel |
| Andrew Morton | Re: [BUILD-FAILURE] 2.6.26-rc8-mm1 - x86 - __ptep_modify_prot_start() missing |
| Bodo Eggert | Re: [PATCH] x86: provide a DMI based port 0x80 I/O delay override. |
git: | |
| Pavel Roskin | Implementing branch attributes in git config |
| Jon Smirl | Importing Mozilla CVS into git |
| Jon Smirl | Figured out how to get Mozilla into git |
| Jakub Narebski | Re: VCS comparison table |
| Richard Stallman | Real men don't attack straw men |
| Adam Getchell | Re: About Xen: maybe a reiterative question but .. |
| carlopmart | About Xen: maybe a reiterative question but .. |
| Bertram Scharpf | First install: Grub doesn't find partitions |
| Waskiewicz Jr, Peter P | RE: [PATCH 2/3][NET_BATCH] net core use batching |
| Jeff Kirsher | [PATCH 1/3] e1000e: add support for the 82567LM-4 device |
| Ayaz Abdulla | [PATCH] forcedeth: msi interrupts |
| Corey Hickey | [PATCH 10/10] Use nested compat attributes to pass parameters. |
