On Thu, 16 Feb 2017 19:32:37 -0800, Anne & Lynn Wheeler wrote:
>
>Unix traditional records are variable length deliminated by trailing
>null/zero byte.
> 
For text files on disk it was far more traditonal to use LF or  NL
rather than NUL as the delimiter.

>lots of traditional unix API programming would read w/o
>length restriction and common attack is to provide extremely long record
>that would overwrite end of buffer being used ... resulting failure
>and/or compromise. Lots of pressure to get UNIX (c language) programmers
>to use API that specify maximum length read.
>
read(), fread(), fgets(), and snprintf() all provide a maximum length
argument.  Among the antiquated outliers are gets() and sprintf().
Those should be neither used nor taught nowadays.

Traditional automobiles lacked seat belts, air bags, and collision
warning systems.  Modern automotive designers aren't allowed to
omit most of those features, although deregulation may change
that.  Few such restrictions apply to software designers.

And it's pointless to boast, repeatedly, about how much better
we are nowadays.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to