HomeFreeBSD

nfscl: Fix a crash when a readdir entry has nul in it

Description

nfscl: Fix a crash when a readdir entry has nul in it

Commit 026cdaa3b3a9 added a check for a nul or "/" in a file
name in a readdir reply. Unfortunately, the minimal testing
done on it did not detect a bug that can cause the client
to crash.

This patch fixes the code so that it does not crash.

Note that a NFS server will not normally return a file
name in a readdir reply that has a nul or "/" in it,
so the crash is unlikely.

PR: 283965

(cherry picked from commit f9f0a1d61c7b97c705246c747baec385e0592966)

Details

Provenance
rmacklemAuthored on Fri, Jan 10, 3:54 AM
Parents
rG544ad91ef9f6: Use ffs_sbget() to replace open-coded superblock reload.
Branches
Unknown
Tags
Unknown