Skip to content

Commit 3f975fe

Browse files
committed
NFS: Avoid printing non-ASCII characters
The "%s" format is a risk (no non-ASCII filtering), thus use the fn_print_str() function.
1 parent b5353b6 commit 3f975fe

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

print-nfs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -896,7 +896,9 @@ nfs_printfh(netdissect_options *ndo,
896896
if (spacep)
897897
*spacep = '\0';
898898

899-
ND_PRINT(" fh %s/", temp);
899+
ND_PRINT(" fh ");
900+
fn_print_str(ndo, (const u_char *)temp);
901+
ND_PRINT("/");
900902
} else {
901903
ND_PRINT(" fh %u,%u/",
902904
fsid.Fsid_dev.Major, fsid.Fsid_dev.Minor);

0 commit comments

Comments
 (0)