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

Jeff Downs heydowns
Fri Jun 12 04:14:35 CEST 2009


On Fri, 12 Jun 2009, Michael Niedermayer wrote:

> 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
> 

Applied.

	-Jeff




More information about the ffmpeg-devel mailing list