[Ffmpeg-devel] [PATCH] imgresample off by one bug

Michael Niedermayer michaelni
Mon Oct 30 00:51:09 CET 2006


Hi

On Sun, Oct 29, 2006 at 11:01:54PM +0100, Alex Beregszaszi wrote:
> Hi,
> 
> This small bug has been found by Steven Johnson in imgresample.c in
> function sws_scale:
> 
> --- one/libavcodec/imgresample.c	2006-10-17 07:51:18.000000000 +1100
> +++ two/libavcodec/imgresample.c	2006-10-19 22:39:34.000000000 +1100
> @@ -686,7 +686,7 @@
>      uint8_t *buf1 = NULL, *buf2 = NULL;
>      enum PixelFormat current_pix_fmt;
>  
> -    for (i = 0; i < 3; i++) {
> +    for (i = 0; i <= 3; i++) {

ok but please use < 4 its IMHO slightly more readable

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

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list