However, buffer overruns are characteristic of languages with no range 
checking. Of course, you can write C in PL/I with, e.g, (NOSTRINGRANGE) 
prefixes.

________________________________________
From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> on behalf of 
Paul Gilmartin <0000000433f07816-dmarc-requ...@listserv.ua.edu>
Sent: Wednesday, March 30, 2022 10:31 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: PL/I question

On Wed, 30 Mar 2022 14:53:57 +0100, Rupert Reynolds wrote:

>That's a common problem, certainly, but if we include the wider world of
>micros and minis, I'd bet that buffer overuns related to null-teminated
>strings (BLEAH!) are in the lead :-)
>
Buffer overruns are hardly peculiar to null-temniated strinigs.  Rather,
they result from indolent programmers' neglecting to check the length
before the move or the status after; using strcat() and sprinitf()
instead of strncat and snprintf(); etc.

What should be done in HLASM?  Use unprotected MVCL, or define
data types with explicit lengths and rely on macros to move data with
protection?

Should an attempted buffer overrun throw an exception?

--
gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to