Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
read_index(): fix reading extension size on BE 64-bit archs
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>
read-cache.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
7a51ed6
)
diff --git
a/read-cache.c
b/read-cache.c
index 82a6238b7783ef41896834dae11a528e77f4e447..053bcf19167ccc8b1d04365da244bc0b358831fe 100644
(file)
--- a/
read-cache.c
+++ b/
read-cache.c
@@
-1016,7
+1016,7
@@
int read_index_from(struct index_state *istate, const char *path)
* extension name (4-byte) and section length
* in 4-byte network byte order.
*/
- u
nsigned long
extsize;
+ u
int32_t
extsize;
memcpy(&extsize, (char *)mmap + src_offset + 4, 4);
extsize = ntohl(extsize);
if (read_index_extension(istate,