NFS: Avoid printing non-ASCII characters

The "%s" format is a risk (no non-ASCII filtering), thus use
the fn_print_str() function.
This commit is contained in:
Francois-Xavier Le Bail 2023-11-02 10:20:00 +01:00
parent b5353b62c2
commit 3f975fe638

View File

@ -896,7 +896,9 @@ nfs_printfh(netdissect_options *ndo,
if (spacep)
*spacep = '\0';
ND_PRINT(" fh %s/", temp);
ND_PRINT(" fh ");
fn_print_str(ndo, (const u_char *)temp);
ND_PRINT("/");
} else {
ND_PRINT(" fh %u,%u/",
fsid.Fsid_dev.Major, fsid.Fsid_dev.Minor);