[Info-vax] Whither VMS?
Mark Daniel
mark.daniel at wasd.vsm.com.au
Sat Oct 3 09:52:39 EDT 2009
VAXman- @SendSpamHere.ORG wrote:
> In article <ha6oek$gn9$02$1 at news.t-online.com>, Michael Kraemer <M.Kraemer at gsi.de> writes:
>> Jordi Guillaumes i Pons schrieb:
>>
>>> Programmers are, some times, lazy. Specially when they work under
>>> unrealistic schedules and not enough resources.
>> I don't buy that. Errors of the kind below are not
>> due to lack of resources.
>>
>>> You can find a lot of
>>> things like this in production:
>>>
>>> void someFunction(char *someString) {
>>> char aBuffer[1024];
>>> strcpy(aBuffer, someString);
>
> strncpy!!
strncpy() may not overflow but then it does not terminate the copied
chars when that happens either. The whole null-termination approach is
a crock (much as I use it).
More information about the Info-vax
mailing list