Martin Koegler <martin.koeg...@chello.at> writes:

> From: Martin Koegler <martin.koeg...@chello.at>
>
> Signed-off-by: Martin Koegler <martin.koeg...@chello.at>
> ---
>  tree-walk.c | 17 +++++++++--------
>  tree-walk.h |  4 ++--
>  tree.h      |  2 +-
>  3 files changed, 12 insertions(+), 11 deletions(-)

In this one, I did not find anything suspicious.

> diff --git a/tree-walk.c b/tree-walk.c
> index 7c9f9e3..a7d8b2a 100644
> --- a/tree-walk.c
> +++ b/tree-walk.c
> @@ -22,10 +22,11 @@ static const char *get_mode(const char *str, unsigned int 
> *modep)
>       return str;
>  }
>  
> -static int decode_tree_entry(struct tree_desc *desc, const char *buf, 
> unsigned long size, struct strbuf *err)
> +static int decode_tree_entry(struct tree_desc *desc, const char *buf, size_t 
> size, struct strbuf *err)
>  {
>       const char *path;
> -     unsigned int mode, len;
> +     unsigned int mode;
> +     size_t len;
>  
>       if (size < 23 || buf[size - 21]) {
>               strbuf_addstr(err, _("too-short tree object"));

The original was especially bad around here, as it didn't even use
ulong.  The conversion makes sense.

Thanks.

Reply via email to