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.
This commit is contained in:
Guy Harris 2020-09-11 01:36:52 -07:00
parent 83b45f0c2e
commit 20ae645964
1 changed files with 7 additions and 0 deletions

View File

@ -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")