aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2020-09-11 01:36:52 -0700
committerGuy Harris <gharris@sonic.net>2020-09-11 01:36:52 -0700
commit20ae64596401b481c79d66731bd3322ecfa71bb5 (patch)
treeaeacd9565a7f0c8696523a485511905e5aa0934a /tools
parent83b45f0c2e7308f169a832395662f72c70b53a91 (diff)
ncp: add a comment about possibly null-truncated strings.
In File Search Continue requests, the path is a single byte giving the string length, followed by that many bytes containing the string value. However, in at least some File Search Continue requests, the string length value is longer than the string, and there's a NUL, followed by other non-zero cruft, in the string.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ncp2222.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/ncp2222.py b/tools/ncp2222.py
index 7acddac4ef..898375dbbf 100755
--- a/tools/ncp2222.py
+++ b/tools/ncp2222.py
@@ -3351,6 +3351,13 @@ PathCookieFlags = val_string16("path_cookie_flags", "Path Cookie
[ 0x0001, "Last component is a File Name" ],
])
PathCount = uint8("path_count", "Path Count")
+#
+# XXX - in at least some File Search Continue requests, the string
+# length value is longer than the string, and there's a NUL, followed
+# by other non-zero cruft, in the string. Should this be an
+# "nstringz8", with FT_UINT_STRINGZPAD added to support it? And
+# does that apply to any other values?
+#
Path = nstring8("path", "Path")
Path16 = nstring16("path16", "Path")
PathAndName = stringz("path_and_name", "Path and Name")