Index | Thread | Search

From:
Todd C. Miller <millert@openbsd.org>
Subject:
Re: vi(1) segfault with startup command bang containing %
To:
jerry <mail@jerryfletcher.org>
Cc:
tech@openbsd.org
Date:
Sat, 02 Aug 2025 14:15:17 -0600

Download raw body.

Thread
On Sat, 02 Aug 2025 19:23:05 +0200, jerry wrote:

> while using vi(1) I encountered a bug that caused it to sefault when a
> specific command was present in a startup file (.nexrc/.exrc) or in a
> startup environment variable (NEXINIT/EXINIT).
> The bug also affects nvi(1) from ports.
> The fix was just a null pointer check.
>
> The command has the form:
> !<external-command> [some-parameters] % [some-parameters]
>
> For example:
> NEXINIT='!ls %' vi test
>
> or adding !ls % in ~/.nexrc

Committed, thanks!

 - todd