Re: [PATCH -mm] Don't truncate /proc/PID/environ at 4096 characters
2007/9/19, James Pearson <[EMAIL PROTECTED]>: > + while (count > 0) { > + int this_len, retval; > + > + this_len = mm->env_end - (mm->env_start + src); > + > + if (this_len <= 0) > + break; > + > + if (this_len > ma
Re: [PATCH -mm] Don't truncate /proc/PID/environ at 4096 characters
> >>+ > >>+ if (copy_to_user(buf, page, retval)) { > > > > > > shouldn't you only copy min(count,retval) bytes? otherwise you could > > write beyond the users buffer "buf", right? > > AFAIK, 'retval' can never be gre