Re: [PATCH v2 03/10] mailmap: remove email copy and length limitation

2013-01-09 Thread Junio C Hamano
Junio C Hamano writes: > Antoine Pelisse writes: > >>> +static struct string_list_item *lookup_prefix(struct string_list *map, >>> + const char *string, size_t >>> len) >>> +{ >>> + int i = string_list_find_insert_index(map, string, 1); >>> +

Re: [PATCH v2 03/10] mailmap: remove email copy and length limitation

2013-01-09 Thread Junio C Hamano
Antoine Pelisse writes: >> +static struct string_list_item *lookup_prefix(struct string_list *map, >> + const char *string, size_t len) >> +{ >> + int i = string_list_find_insert_index(map, string, 1); >> + if (i < 0) { >> + /*

Re: [PATCH v2 03/10] mailmap: remove email copy and length limitation

2013-01-09 Thread Antoine Pelisse
> +static struct string_list_item *lookup_prefix(struct string_list *map, > + const char *string, size_t len) > +{ > + int i = string_list_find_insert_index(map, string, 1); > + if (i < 0) { > + /* exact match */ > +

[PATCH v2 03/10] mailmap: remove email copy and length limitation

2013-01-07 Thread Junio C Hamano
In map_user(), we have email pointer that points at the beginning of an e-mail address, but the buffer is not terminated with a NUL after the e-mail address. It typically has ">" after the address, and it could have even more if it comes from author/committer line in a commit object. Or it may no