Re: [PATCH 09/19] tree-diff.c: reserve space in "base" for pathname concatenation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/12/14 Junio C Hamano <gitster@xxxxxxxxx>:
> Nguyán ThÃi Ngác Duy Â<pclouds@xxxxxxxxx> writes:
>
>> This patch make sure that "base" parameter is writable. The callees
>> are free to modify it as long as base remains the same before
>> entering and after leaving the callee.
>>
>> This avoids quite a bit of malloc and memcpy().
>>
>> Signed-off-by: Nguyán ThÃi Ngác Duy <pclouds@xxxxxxxxx>
>> ---
>
> I like what I see in this patch in general, but there is nothing that
> guarantees that you are "reserving" enough space. ÂDoesn't the buffer
> overflow with deep enough trees?

All paths should not exceed PATH_MAX, right? That's my assumption. If
it's wrong, then, well.. we need another way.
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]