summaryrefslogtreecommitdiff
path: root/url.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-03-21 19:01:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-03-23 17:12:10 (GMT)
commitb84e65d40929ec1146f54dcf4c9dbf8dc58467d0 (patch)
tree666e5f863b994cc9289bfa61be40f4d23b6566dd /url.c
parenta0feb1b1870fbb74f65d6a8951e4b2e2a2347ecf (diff)
downloadgit-b84e65d40929ec1146f54dcf4c9dbf8dc58467d0.zip
git-b84e65d40929ec1146f54dcf4c9dbf8dc58467d0.tar.gz
git-b84e65d40929ec1146f54dcf4c9dbf8dc58467d0.tar.bz2
merge: fix NULL pointer dereference when merging nothing into void
When we are on an unborn branch and merging only one foreign parent, we allow "git merge" to fast-forward to that foreign parent commit. This codepath incorrectly attempted to dereference the list of parents that the merge is going to record even when the list is empty. It must refuse to operate instead when there is no parent. All other codepaths make sure the list is not empty before they dereference it, and are safe. Reported-by: Jose Ivan B. Vilarouca Filho Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'url.c')
0 files changed, 0 insertions, 0 deletions