fetch-pack: check for valid commit from server
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Thu, 18 Aug 2011 13:36:03 +0000 (20:36 +0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 18 Aug 2011 19:25:54 +0000 (12:25 -0700)
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>
No differences found