CVSROOT: /cvs Module name: src Changes by: [email protected] 2021/10/25 08:17:24
Modified files:
usr.bin/vi/common: exf.c
Log message:
vi(1): fix use after free with unsaved buffer
Issuing a zero-arg ex_edit command (:e) while using a named buffer
with no backing file caused vi(1)/ex(1) to free the strings
representing the buffer name and the name of the temporary file.
This change detects the situation and only frees the newly allocated
EXF structure (ep).
Reported on bugs@ by kn@.
OK millert@
