freebsd-ports/editors/nvi2
Craig Leres 5ac4f1e502 editors/nvi2: Fix core dump when tags file pattern has a trailing '\'
If you create a tags file of a macro that ends with a '\' and tag
for it, vi dumps core. For example:

    zinc 76 % cat test.h
    #define LATIN2PLAIN(ch) (((u_char)ch) >= 0x80 ? \
       pgm_read_byte_far(pgm_get_far_address(latin2plain) + \
       (((u_char)ch) - 0x80)) : (isprint(ch) ? (ch) : '_'))
    zinc 77 % ctags test.h
    zinc 78 % vi -t LATIN2PLAIN
    Segmentation fault

The problem is that the loop variable is unsigned (size_t) and it
gets decremented twice: 1 -> 0 -> 4294967295

Apply the upstream patch to solve this:

    https://github.com/lichray/nvi2/pull/111
2022-11-02 23:41:34 -07:00
..
files editors/nvi2: Fix core dump when tags file pattern has a trailing '\' 2022-11-02 23:41:34 -07:00
Makefile editors/nvi2: Fix core dump when tags file pattern has a trailing '\' 2022-11-02 23:41:34 -07:00
distinfo
pkg-descr Remove WWW entries moved into port Makefiles 2022-09-07 23:58:51 +02:00