$ readelf -r $(perl -e "print 'a' x 100000")
Assertion failed: (nvl->nvl_error == 0), function nvlist_find, file /usr/home/markj/src/freebsd-dev/sys/contrib/libnv/nvlist.c, line 341.
Abort trap (core dumped)
Created attachment 206337 [details]
This patch should fix the problem for you.
Does it work for you?
It does, thanks. I think it should fail if strlen(argv[i]) >= MAXPATHLEN, since MAXPATHLEN is supposed to be a buffer size, not a string length.
A commit references this bug:
Date: Wed Aug 7 19:30:33 UTC 2019
New revision: 350695
cap_filergs: limit size of the file name
The limit of the name in fileargs is twice the size of the MAXPATH.
The nvlist will not add an element with the longer name.
We can detect at this point that the path is too big, and simple return
the same error as open(2) would.
Reported by: markj
Tested by: markj
MFC after: 2 weeks