[MPlayer-dev-eng] off-by-one error in input.c causing lirc lockups

D Richard Felker III dalias at aerifal.cx
Mon Apr 8 17:38:51 CEST 2002


On Mon, Apr 08, 2002 at 04:43:04PM +0200, Jindrich Makovicka wrote:
> Hello folks,
> 
> I think this is the bug which causes LIRC stop receiving after more 
> intense ffwd. The buffer has been shifted without the newline so all the 
> stuff gets stuck eventually.
> 
> Here is the obvious fix:
> 
> --- old/input.c Wed Apr  3 19:58:17 
> 2002                                                                     
> +++ input.c     Mon Apr  8 16:36:19 
> 2002                                                                     
> @@ -560,7 +560,7 
> @@                                                                          
> 
>       mp_fd->flags &= 
> ~MP_FD_DROP;                                                                
> 
>     
> }                                                                           
> 
>     if( mp_fd->pos - (l+1) > 
> 0)                                                                          
> 
> -      
> memmove(mp_fd->buffer,end,mp_fd->pos-(l+1));                                
> 
> +      
> memmove(mp_fd->buffer,end+1,mp_fd->pos-(l+1));                              
> 
>     mp_fd->pos -= 
> l+1;                                                                        
> 
>   }

Your mailer really mangled that one bad....you might want to try
resending it as a properly encoded attachment to protect it.

Rich





More information about the MPlayer-dev-eng mailing list