Files
git/builtin
Jeff King d9e557a320 show-branch: store resolved head in heap buffer
We resolve HEAD and copy the result to a fixed-size buffer
with memcpy, never checking that it actually fits. This bug
dates back to 8098a178b (Add git-symbolic-ref, 2005-09-30).
Before that we used readlink(), which took a maximum buffer
size.

We can fix this by using resolve_refdup(), which duplicates
the buffer on the heap. That also lets us just check
for a NULL pointer to see if we have resolved HEAD, and
drop the extra head_p variable.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-02-14 11:28:53 -08:00
..
2016-07-13 11:24:10 -07:00
2016-09-28 14:56:00 -07:00
2016-08-03 15:10:28 -07:00
2016-06-17 15:46:10 -07:00
2016-10-11 14:18:32 -07:00
2016-07-13 11:24:10 -07:00
2016-07-14 15:50:41 -07:00
2016-07-25 14:13:33 -07:00
2016-07-13 11:24:10 -07:00
2016-04-29 12:59:09 -07:00