Subject: Re: copyinstr() with a zero-length buffer
To: Chuck Silvers <chuq@chuq.com>
From: Charles M. Hannum <root@ihack.net>
List: tech-kern
Date: 11/02/1999 10:40:22
Chuck Silvers <chuq@chuq.com> writes:
> here's a philosophical question for ya: is it legal to call copyinstr()
> with maxlen == 0?
Yes.
> the sparc will panic if this happens, but the sample
> program in PR 7838 will cause sys_execve() to do just that.
> so which is wrong?
The SPARC code is definitely wrong. There is no reason it should
*care* whether maxlen was 0.