[Info-vax] $sndopr() and dsc64$descriptor
Jim
mckinneyj at leidos.com
Fri Mar 12 07:26:13 EST 2021
On Thursday, March 11, 2021 at 1:55:39 PM UTC-5, Stephen Hoffman wrote:
> On 2021-03-11 18:32:07 +0000, Jim said:
>
> > _strcpy32((__char_ptr32)&reply.opc$l_ms_text, message);
> >
> > length = strlen((__char_ptr32)&reply.opc$l_ms_text);
> While that's not specifically introducing a bug, use of that sequence
> elsewhere can be Bad.
> --
> Pure Personal Opinion | HoffmanLabs LLC
Yes, C string functions that rely on null termination can be unsafe. Alternatives such as the VMS STR$ RTL routines or even the "n" variants of the C string functions would be better choices for production code.
More information about the Info-vax
mailing list