• J
    pack-check.c::verify_packfile(): don't run SHA-1 update on huge data · 8977c110
    Junio C Hamano 提交于
    Running the SHA1_Update() on the whole packfile in a single call
    revealed an overflow problem we had in the SHA-1 implementation
    on POWER architecture some time ago, which was fixed with commit
    b47f509b (June 19, 2006).  Other SHA-1 implementations may have
    a similar problem.
    
    The sliding mmap() series already makes chunked calls to
    SHA1_Update(), so this patch itself will become moot when it
    graduates to "master", but in the meantime, run the hash
    function in smaller chunks to prevent possible future problems.
    Signed-off-by: NJunio C Hamano <junkio@cox.net>
    8977c110
pack-check.c 4.5 KB