[PATCH] mmaper_kern.c fixes [buffer overruns]

2005-08-26 Thread Al Viro
* copy_from_user() can fail; ->write() must check its return value. * severe buffer overruns both in ->read() and ->write() - lseek to the end (i.e. to mmapper_size) and if(count + *ppos > mmapper_size) count = count + *ppos - mmapper_size; will do

[PATCH] mmaper_kern.c fixes [buffer overruns]

2005-08-26 Thread Al Viro
* copy_from_user() can fail; -write() must check its return value. * severe buffer overruns both in -read() and -write() - lseek to the end (i.e. to mmapper_size) and if(count + *ppos mmapper_size) count = count + *ppos - mmapper_size; will do absolutely