René Scharfe writes:
>> "Next call to the function invalidates the return value the last
>> caller received" feels like playing with fire. Most existing
>> callers are safe in that the first thing they do to the returned
>> string is xstrdup() it, but we would need to check all the other
>> call
Am 28.07.2014 um 23:42 schrieb Junio C Hamano:
Jeff King writes:
On Mon, Jul 28, 2014 at 08:28:30PM +0200, René Scharfe wrote:
@@ -60,26 +58,22 @@ static const char *real_path_internal(const char *path, int
die_on_error)
goto error_out;
}
- if (strlcpy
Am 28.07.2014 um 21:09 schrieb Jeff King:
On Mon, Jul 28, 2014 at 08:28:30PM +0200, René Scharfe wrote:
static const char *real_path_internal(const char *path, int die_on_error)
{
- static char bufs[2][PATH_MAX + 1], *buf = bufs[0], *next_buf = bufs[1];
+ static struct strbuf sb
Jeff King writes:
> On Mon, Jul 28, 2014 at 08:28:30PM +0200, René Scharfe wrote:
>
>> @@ -60,26 +58,22 @@ static const char *real_path_internal(const char *path,
>> int die_on_error)
>> goto error_out;
>> }
>>
>> -if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX) {
>
On Mon, Jul 28, 2014 at 08:28:30PM +0200, René Scharfe wrote:
> @@ -60,26 +58,22 @@ static const char *real_path_internal(const char *path,
> int die_on_error)
> goto error_out;
> }
>
> - if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX) {
> - if (die_on_
On Mon, Jul 28, 2014 at 08:28:30PM +0200, René Scharfe wrote:
> static const char *real_path_internal(const char *path, int die_on_error)
> {
> - static char bufs[2][PATH_MAX + 1], *buf = bufs[0], *next_buf = bufs[1];
> + static struct strbuf sb = STRBUF_INIT;
Hrm. I thought at first th
6 matches
Mail list logo