Comment by pjmlp
Meanwhile, in Modula-2 from 1978, that would be
PROCEDURE my_func(msg: ARRAY OF CHAR);
Now you can use LOW() and HIGH() to get the lower and upper bounds, and naturally bounds checked unless you disabled them, locally or globaly.
This should not be downvoted, it is both factually correct and a perfect illustration of these problems already being solved and ages ago at that.
It is as if just pointing this out already antagonizes people.