On Wed, 20 Apr 2016, Jeremy Kerr wrote:

>> Interesting.  Maybe on my remotes the memory after the identity string
>> just happens to have been zeroed out.  :)
>
> That trailing data isn't from your remote, it's from your stack.
>
> Since ReadFile() will only write data_read bytes into its 'rd' argument,
> anything past the data_read-th byte wasn't populated by that function -
> it just came from whatever was in the buffer before calling ReadFile().
>
> [to confirm, try adding a memset(buffer, 0xff, buflen); before the
> ReadFile() call]

Actually, in my case, it is from the remote.  data_read is 289 bytes, and 
bytes 286-289 are all zeroes.  Thus, before your patch, the string length 
was 285 bytes.

In any event, your patch should be fine.

Scott

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
concordance-devel mailing list
concordance-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/concordance-devel

Reply via email to