PR/60554 CVS commit: src/sys/nfs
"Taylor R Campbell" <[email protected]>
| Newsgroups | gmane.os.netbsd.bugs |
|---|---|
| Message-ID | <[email protected]> |
The following reply was made to PR kern/60554; it has been noted by GNATS. From: "Taylor R Campbell" <[email protected]> To: [email protected] Cc: Subject: PR/60554 CVS commit: src/sys/nfs Date: Sat, 8 Aug 2026 00:09:25 +0000 Module Name: src Committed By: riastradh Date: Sat Aug 8 00:09:25 UTC 2026 Modified Files: src/sys/nfs: nfs_vnops.c Log Message: nfs: Avoid UB in integer shift amounts. Just use ilog2 explicitly here, instead of writing out a loop with shifts and increments to compute it more slowly and buggily. Note the confusing fencepost adjustment. Clamp _PC_FILESIZEBITS at the actual size of off_t since we can't go beyond that. PR kern/60554: nfs: integer shift UB in pathconf(_PC_FILESIZEBITS) To generate a diff of this commit: cvs rdiff -u -r1.328 -r1.329 src/sys/nfs/nfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.