Nonlinear diffusion in a finite layer