Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ed: input filename validation (#542)
* An empty filename (ed '') is incorrect usage and should show an error * GNU ed attempts open() and fails; OpenBSD ed fails with "invalid filename" error and avoids open() (follow OpenBSD) * In edEdit(), $filename could still be undefined in default case because $RememberedFilename is undefined when starting ed with empty buffer * The code was a bit redundant because the value of $RememberedFilename was saved into itself again * Save $RememberedFilename only if filename is taken from $args[0]
- Loading branch information