entry.c: convert checkout_entry to use strbuf
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Thu, 24 Oct 2013 01:55:35 +0000 (08:55 +0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 24 Oct 2013 21:58:37 +0000 (14:58 -0700)
The old code does not do boundary check so any paths longer than
PATH_MAX can cause buffer overflow. Replace it with strbuf to handle
paths of arbitrary length.

The OS may reject if the path is too long though. But in that case we
report the cause (e.g. name too long) and usually move on to checking
out the next entry.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found