fuser icon indicating copy to clipboard operation
fuser copied to clipboard

Use checked arithmetic for addition to Unix epoch.

Open trombonehero opened this issue 2 years ago • 2 comments

The current code can panic with filesystems that do not store times. Using checked arithmetic allows such filesystems to operate without panic.

trombonehero avatar Feb 23 '23 16:02 trombonehero

I'm not sure this is the right fix. That code path is only taken when the appropriate FATTR_CRTIME...etc flag is set. Do you know why that flag is getting set without a valid timestamp passed in?

cberner avatar Feb 25 '23 17:02 cberner

This is happening (at least for me on macOS) when sending FileAttr to a ReplyEntry with SystemTime::now() and a TTL of 1s.

I wonder if this is also related to https://github.com/cberner/fuser/issues/217?

trombonehero avatar Mar 09 '23 15:03 trombonehero