[Info-vax] Calling standards, was: Re: Byte range locking - was Re: Oracle on VMS

Bill Gunshannon bill.gunshannon at gmail.com
Wed Nov 23 10:54:58 EST 2016


On 11/23/16 4:06 AM, Johnny Billquist wrote:
> On 2016-11-22 19:52, Simon Clubley wrote:
>> On 2016-11-22, Robert A. Brooks <FIRST.LAST at vmssoftware.com> wrote:
>>
>> However, at the very lowest levels of those code bases, the majority
>> still calls into a C API regardless of what the rest of the code is
>> written in. This makes the C API on Unix/Linux the Unix/Linux
>> equivalent of the common calling standard on VMS.
>>
>> The main issue I have with the C APIs are the lack of counted strings
>> or descriptors for string handling (which annoys me) but that doesn't
>> change the fact that the C API _is_ the common calling standard for
>> Unix/Linux.
>
> This is muddling the water some. You should keep the C standard library
> separated from the Unix API.
>
> The C standard library use NUL-terminated strings, which (as we all
> know) have serious security problems, and god knows what else.

Why do people insist on perpetuating the notion that this is a C
security problem.  C merely continued a practice that predated it
probably to maintain compatability with earlier code.

The PDP-11 Macro Directive .PRINT takes a null terminated string
as its only argument.  I suspect the VAX had the same and it
probably still exists in MACRO but I don't have my manual handy to
verify that.

>
> The Unix API do not. All system calls that take string arguments
> actually have a pointer and a length argument. The system calls do not
> allow the crazyness of the standard library.
>
>     Johnny
>

bill




More information about the Info-vax mailing list