summaryrefslogtreecommitdiff
path: root/t/t1400-update-ref.sh
diff options
context:
space:
mode:
authorLibravatar Jeff King <peff@peff.net>2017-09-27 02:02:21 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-09-27 15:45:57 +0900
commit228740b67b55f4ee23637bd1472a73ae50efe93a (patch)
tree48a1855d58b4bccd90ee407c834447f349db26e6 /t/t1400-update-ref.sh
parentdistinguish error versus short read from read_in_full() (diff)
downloadtgif-228740b67b55f4ee23637bd1472a73ae50efe93a.tar.xz
worktree: use xsize_t to access file size
To read the "gitdir" file into memory, we stat the file and allocate a buffer. But we store the size in an "int", which may be truncated. We should use a size_t and xsize_t(), which will detect truncation. An overflow is unlikely for a "gitdir" file, but it's a good practice to model. Signed-off-by: Jeff King <peff@peff.net> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t1400-update-ref.sh')
0 files changed, 0 insertions, 0 deletions