On 2022/11/10 18:53:58 +0300, Mikhail <mp39...@gmail.com> wrote: > FreeBSD version doesn't crash: > > [freefall ~] ministat - - > ministat: Cannot open -: No error: 0 > > It's because on line 652 (see code snippet above) we check if array > element is set to NULL, and before that we either use 0 index for stdin > or don't set any element if we see any more -), so, I'd suggest to fail > the same way as FreeBSD does, for this we need to explicitly set all > array elements to NULL. > > So, how about such approach? > > idea:~$ ministat - - > > ministat: Cannot open -: Undefined error: 0
The issue is that this diff also breaks $ ministat iguana - <chameleon ministat: Cannot open -: Undefined error: 0 which IMHO should be a valid usage. Of course what will matter for the port is what upstream (FreeBSD) ends up committing; but fwiw i prefer OP and jca diff.