[FFmpeg-cvslog] r21029 - trunk/libavcodec/alsdec.c
Tue Jan 5 09:02:11 CET 2010
On Tue, 2010-01-05 at 08:39 +0100, Reimar D?ffinger wrote:
> On Tue, Jan 05, 2010 at 08:19:28AM +0200, Uoti Urpala wrote:
> > My guess is that the actual cause of the crash was wrapping arithmetic
> > in the original subtraction ("smp" is unsigned). The new version changes
> Then the question is: why in the world is smp unsigned, and why is the
> code obfuscated instead of giving it a more appropriate type?
> Looking at the code I can't see even remotely any reason why smp should
> be unsigned.
Some people think it's a good idea to make variables unsigned just
because they're not supposed to hold negative values. Usually they're
not aware how it causes exactly this kind of problems. This has been
discussed before, for example
More information about the ffmpeg-cvslog