author | Nicolas Pitre <nico@cam.org> | |
Tue, 20 Mar 2007 21:07:48 +0000 (17:07 -0400) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 21 Mar 2007 05:09:59 +0000 (22:09 -0700) | ||
commit | 9096c660a85c4a3d30f8885c766c34ce0766e869 | |
tree | 6e4f7b7b59ddd13684b044754278211a9f62e2e1 | tree | snapshot |
parent | ce9fbf16e0000ecca92870a90e4b30afcb3917b7 | commit | diff |
index-pack: more validation checks and cleanups
When appending objects to a pack, make sure the appended data is really
what we expect instead of simply loading potentially corrupted objects
and legitimating them by computing a SHA1 of that corrupt data.
With this the sha1_object() can lose its test_for_collision parameter
which is now redundent.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
When appending objects to a pack, make sure the appended data is really
what we expect instead of simply loading potentially corrupted objects
and legitimating them by computing a SHA1 of that corrupt data.
With this the sha1_object() can lose its test_for_collision parameter
which is now redundent.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
index-pack.c | diff | blob | history |