[Top][All Lists]

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

Re: mach_host_self() doesn't acquire new port name?!

From: Thomas Bushnell, BSG
Subject: Re: mach_host_self() doesn't acquire new port name?!
Date: 07 May 2001 18:34:54 -0700
User-agent: Gnus/5.0803 (Gnus v5.8.3) Emacs/20.7

Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> writes:

> While I am looking at stupid little omissions that don't make a real
> difference: In proc/host.c we call host_kernel_version and use the result
> without making sure it is actually null terminated. The kernel uses strncpy
> to copy out the string.  Should the kernel put
> out_version[MAX_KERNEL_VERSION - 1] = '\0';
> or should proc do this, or should proc allocated MAX_KERNEL_VERSION + 1 and
> set kv[KERNEL_VERSION_MAX] to '\0', to save the last character?


We should assume that Mach defines the interface, and change proc to
adapt.  That will keep our interfaces as similar to other Mach's as

Even though, in this case, the kernel has the wrong interface
specification.  (It's also wrong in just the same way gethostname is

reply via email to

[Prev in Thread] Current Thread [Next in Thread]