Re: [PATCH 5/6] http-push: check path length before using it
- From
Tay Ray Chuan <rctay89@gmail.com>
- Date
- Nov 20, 2010, 04:28 UTC
- Message-ID
- <AANLkTikJz+SigzqFdeP+rZR3FS06U1exDb59AsRFTQAj@mail.gmail.com>
- In-Reply-To
- <20101119183339.GB26187@burratino>
Hi,
On Sat, Nov 20, 2010 at 2:33 AM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 12 quoted lines
> [snip]
> ... or here. So perhaps:
>
> if (path) {
> const char *url = repo->path;
> if (!url)
> url = repo->url;
> if (strncmp(path, url, repo->path_len)) {
> error("Parsed path '%s' does not match url: '%s'\n",
> path, url);
> } else {
> path += ...Looks much cleaner, thanks.
> By the way, is the error behavior correct? This prints a message with > "error: " and then continues anyway.
Yeah, this fits in with the exiting xml code paths - they just indicate errors and continue.
-- Cheers, Ray Chuan