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-09-15 12:13:54 -07:00
2016-11-29 13:27:53 -08:00
2016-07-13 11:24:10 -07:00
2016-09-28 14:56:00 -07:00
2016-11-29 13:28:02 -08:00
2016-09-08 12:16:38 -07:00
2016-11-29 13:28:02 -08:00
2016-10-28 09:01:14 -07:00
2016-05-13 13:18:27 -07:00
2016-11-29 13:27:59 -08:00
2016-08-10 12:33:20 -07:00
2016-05-13 14:35:49 -07:00
2016-05-13 14:35:49 -07:00
2016-06-06 14:27:35 -07:00
2016-06-06 14:27:35 -07:00
2016-06-28 11:39:02 -07:00
2016-10-28 09:01:17 -07:00
2016-09-15 12:23:38 -07:00
2016-08-08 14:21:36 -07:00
2016-09-29 16:49:42 -07:00
2016-07-28 11:25:51 -07:00
2016-09-08 21:35:55 -07:00
2016-08-03 15:10:28 -07:00
2016-06-17 15:46:10 -07:00
2016-06-13 10:37:48 -07:00
2016-09-15 10:07:10 -07:00
2016-07-26 11:13:44 -07:00
2016-06-06 11:14:43 -07:00
2016-10-12 14:30:16 -07:00
2016-05-09 12:29:08 -07:00
2016-06-28 11:39:02 -07:00
2016-04-25 14:23:42 -07:00
2016-09-15 12:23:38 -07:00
2016-10-11 14:18:32 -07:00
2016-05-31 14:08:26 -07:00
2016-07-28 09:09:18 -07:00
2016-10-03 13:22:13 -07:00
2016-06-03 14:38:03 -07:00
2016-07-13 11:24:10 -07:00
2016-07-14 15:50:41 -07:00
2016-09-08 21:36:00 -07:00
2016-04-25 14:23:42 -07:00
2016-05-06 13:16:37 -07:00
2016-07-25 14:13:33 -07:00
2016-07-13 11:24:10 -07:00
2016-05-06 14:53:24 -07:00
2016-10-28 09:01:22 -07:00
2016-07-20 12:10:44 -07:00
2016-08-01 13:42:10 -07:00
2016-07-06 10:11:08 -07:00
2016-08-10 11:55:24 -07:00
2016-04-29 14:15:57 -07:00
2016-07-19 13:22:15 -07:00
2017-02-14 11:28:53 -08:00
2016-09-27 14:02:40 -07:00
2016-09-02 09:01:38 -07:00
2016-04-29 12:59:09 -07:00
2016-06-28 11:39:02 -07:00
2016-09-29 16:49:47 -07:00
2016-05-09 12:29:08 -07:00
2016-04-22 14:06:46 -07:00
2016-09-27 10:51:33 -07:00