summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7a51ed6)
raw | patch | inline | side by side (parent: 7a51ed6)
author | Nathaniel W Filardo <nwf@cs.jhu.edu> | |
Sun, 27 Dec 2009 06:11:21 +0000 (01:11 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 27 Dec 2009 18:41:48 +0000 (10:41 -0800) |
On big endian platforms with 8-byte unsigned long, the code reads the
size of the index extension section (which is a 4-byte network byte
order integer) incorrectly.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
size of the index extension section (which is a 4-byte network byte
order integer) incorrectly.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
read-cache.c | patch | blob | history |
diff --git a/read-cache.c b/read-cache.c
index 82a6238b7783ef41896834dae11a528e77f4e447..053bcf19167ccc8b1d04365da244bc0b358831fe 100644 (file)
--- a/read-cache.c
+++ b/read-cache.c
* extension name (4-byte) and section length
* in 4-byte network byte order.
*/
- unsigned long extsize;
+ uint32_t extsize;
memcpy(&extsize, (char *)mmap + src_offset + 4, 4);
extsize = ntohl(extsize);
if (read_index_extension(istate,