author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | |
Thu, 18 Aug 2011 13:36:03 +0000 (20:36 +0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 18 Aug 2011 19:25:54 +0000 (12:25 -0700) | ||
commit | ec099546a9afdb73b6bf39d5d684e6fb207e2a7f | |
tree | 4165f093c23fe5ea472eba86ab77ce65ffcf3e6d | tree | snapshot |
parent | a47a645e7057f28441f0f4b259db11171158553a | commit | diff |
fetch-pack: check for valid commit from server
A malicious server can return ACK with non-existent SHA-1 or not a
commit. lookup_commit() in this case may return NULL. Do not let
fetch-pack crash by accessing NULL address in this case.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
A malicious server can return ACK with non-existent SHA-1 or not a
commit. lookup_commit() in this case may return NULL. Do not let
fetch-pack crash by accessing NULL address in this case.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch-pack.c | diff | blob | history |