News for hackers. Stuff that matters.
Re:Buffer overflow when pwfeedback is set in sudoers by shakna on Monday February 03, 2020 @07:02PM (#22230798)
stdlib was introduced in '89. I specifically said pre-89, because this is what many C programmer's today depend on. malloc and free were brand new in '89 (mmap and friends didn't even exist yet). Instead you'd be playing with calloc and alloca.

Here's one for how safe that was: alloca could not guarantee the pointer it handed you is either valid, or the size you requested.

POSIX.1 only came along in '88 (with our first definition of stdlib). Whilst IO had mostly stabilised by that point, there were still plenty of platforms that didn't use the Bells header (stdio.h).

Files, signals, floating point behaviour, process creation - none of that was standardised yet.

Re:Buffer overflow when pwfeedback is set in sudoers by icedchai on Monday February 03, 2020 @11:03PM (#22232265)
You may be off by a decade. malloc and free existed long before 1988. I can find evidence of it going back as far as 1979 with 7th Edition Unix: https://en.wikipedia.org/wiki/Version_7_Unix http://man.cat-v.org/unix_7th/3/malloc

Most of what was defined by POSIX already existed on common platforms, like SunOS, before it was formally standardized. SunOS 4.0 even had mmap in early 1988! (See https://archive.org/stream/bitsavers_sunsunos4.erenceManual1... )