Re: [patch 3/3] [media] lirc_dev: fixes in lirc_dev_fop_read()

2010-11-17 Thread Jarod Wilson
On Wed, Nov 17, 2010 at 08:20:15AM +0300, Dan Carpenter wrote: This makes several changes but they're in one function and sort of related: buf was leaked on error. The leak if we try to read an invalid length is the main concern because it could be triggered over and over. If the

[patch 3/3] [media] lirc_dev: fixes in lirc_dev_fop_read()

2010-11-16 Thread Dan Carpenter
This makes several changes but they're in one function and sort of related: buf was leaked on error. The leak if we try to read an invalid length is the main concern because it could be triggered over and over. If the copy_to_user() failed, then the original code returned the number of bytes