Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/kern



Le 26/06/2019 à 22:33, Christos Zoulas a écrit :
On Jun 26, 10:30pm, max%m00nbsd.net@localhost (Maxime Villard) wrote:
-- Subject: Re: CVS commit: src/sys/kern

| Le 25/06/2019 à 23:32, Christos Zoulas a écrit :
| > Module Name:	src
| > Committed By:	christos
| > Date:		Tue Jun 25 21:32:58 UTC 2019
| >
| > Modified Files:
| > 	src/sys/kern: kern_exec.c
| >
| > Log Message:
| > Fail if getcwd fails. Pointed out by maxv@
| >
| >
| > To generate a diff of this commit:
| > cvs rdiff -u -r1.471 -r1.472 src/sys/kern/kern_exec.c
| >
| > Please note that diffs are not public domain; they are subject to the
| > copyright notices on the relevant files.
|
| You still left one error condition unhandled. Is this intentional, or did
| you just forget that one too?

I don't see it.

Yet it seems pretty obvious to me. As you explained in the comment, the
function is supposed to return an absolute path. Here, however, it does
not return an absolute path:

	if (len + 1 >= MAXPATHLEN)
		goto out;

Nor does it initialize 'offs'. Notice, in addition, the "XXX: GCC" you put
in the caller, as if GCC was wrong in reporting that because of the
aforementioned branch, 'offs' wasn't getting initialized properly.

So, has this become intentional, or not? Because it seems clear it wasn't
intentional when you initially committed it.


Home | Main Index | Thread Index | Old Index