[FFmpeg-devel] [PATCH] Fix av_crc unaligned accesses

Michael Niedermayer michaelni
Fri Jun 12 00:50:39 CEST 2009


On Thu, Jun 11, 2009 at 06:48:25PM -0400, Jeff Downs wrote:
> Currently, av_crc() blindly casts a byte buffer to uint32 without regard 
> for alignment requirements.  The documentation doesn't state any alignment 
> requirements.
> 
> This issue causes crashes during decoding on sparc.
> 
> Attached changes the implementation to compute byte-by-byte until aligned, 
> then proceeds with the 32-bit-based calculations.
> 
> Alternatively, docs could be added to specify alignment restriction. (I 
> know of at least one decoder that would need to be changed to meet such a
> requirement)
> 
> 	-Jeff
>  crc.c |    6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> e34d1e23bbc46adb97e54743163cfef4bccc389c  crc-align.patch

ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The greatest way to live with honor in this world is to be what we pretend
to be. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090612/b661ac94/attachment.pgp>



More information about the ffmpeg-devel mailing list