[sheepdog] [PATCH v1] sheep/http: fix typo
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Wed Dec 3 08:22:36 CET 2014
At Thu, 27 Nov 2014 20:44:26 +0800,
Bingpeng Zhu wrote:
>
> We should check the return pointer of strstr().
>
> Signed-off-by: Bingpeng Zhu <bingpeng.zbp at alibaba-inc.com>
> ---
> sheep/http/http.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
Cc-ing Robin,
Applied, thanks.
BTW, the patch changes http subsystem. Could you Cc Robin from next
time? Because he is the maintainer of the subsystem.
Robin, the patch seems good to me. So I applied it. Is this ok?
Thanks,
Hitoshi
>
> diff --git a/sheep/http/http.c b/sheep/http/http.c
> index 5786e90..3f3b5b2 100644
> --- a/sheep/http/http.c
> +++ b/sheep/http/http.c
> @@ -175,7 +175,7 @@ static int request_init_operation(struct http_request *req)
> char *left, *right, num[64];
> uint64_t max;
> left = strstr(p, prefix);
> - if (!p)
> + if (!left)
> goto invalid_range;
> right = strchr(left, '-');
> strncpy(num, left + sizeof(prefix) - 1, right - left);
> --
> 1.7.1
>
>
>
>
> --
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog
More information about the sheepdog
mailing list