freebsd-src icon indicating copy to clipboard operation
freebsd-src copied to clipboard

less: Do not trust st_size if it equals zero

Open ricardobranco777 opened this issue 1 year ago • 3 comments

Fix for less(1) not being to operate on files residing in pseudo-filesystems that advertize a zero size value.

Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=276133

ricardobranco777 avatar Jan 05 '24 19:01 ricardobranco777

We usually want contrib to be merged upstream first.

igalic avatar Jan 16 '24 13:01 igalic

We usually want contrib to be merged upstream first.

Fix merged upstream: https://github.com/gwsw/less/pull/468

ricardobranco777 avatar Jan 21 '24 20:01 ricardobranco777

Thank you for tracking this, @ricardobranco777

as soon as they make a new release, we'll import it into our vendor/less branch: https://cgit.freebsd.org/src/log/?h=vendor/less

igalic avatar Jan 22 '24 01:01 igalic

CC @delphij

emaste avatar Apr 19 '24 17:04 emaste

Specifically, should we import, or just cherry-pick the patch...

bsdimp avatar Apr 19 '24 17:04 bsdimp

This isn't in v643, but is in v653 (https://github.com/gwsw/less/commit/1fafd968b48e5cea6c85f126d77071a8de707a55 shows it there), but isn't in the release notes. v653 is in beta testing right now, so once it's official, @delphij will important it and we'll close this... Reading the tea leaves suggests this will be soon enough that cherry-picking the change isn't needed, but I'll reevaluate next time I do a deep scrub of the PRs (just before BSDcan most likely).

bsdimp avatar Apr 23 '24 18:04 bsdimp

Thanks for the PR. I'll commit this to vendor branch and merge this one. git will be able to handle it properly for future imports.

delphij avatar Apr 23 '24 20:04 delphij

Merged as cae336280b0d

delphij avatar Apr 24 '24 05:04 delphij