[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-freedink] zziplib: misaligned pointer access on MIPS
From: |
Sylvain Beucler |
Subject: |
[Bug-freedink] zziplib: misaligned pointer access on MIPS |
Date: |
Thu, 9 Apr 2009 18:14:49 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
Hello,
When cross-compiling zziplib for PSP (PlayStation Portable, a
MIPS-based architecture), I got segfaults when accessing a .zip (I use
it in GNU FreeDink, a game / game engine - http://www.freedink.org/ ).
The reason is that the zip file entry structure, which is a set of
chars, is converted to an integer pointer (uint32_t*) and then
dereferenced (*pointer).
This does not work when the field is not 32bit aligned (which is the
case for the z_offset field, at offset 42 in the structure).
I posted a fix that only uses the portable (byte-per-byte) access for
the PSP branch:
http://forums.ps2dev.org/viewtopic.php?t=11869
I thought I'd let you know so you can fix too :)
Cheers!
--
Sylvain
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-freedink] zziplib: misaligned pointer access on MIPS,
Sylvain Beucler <=