From 587fac59247ee7dc8a6f75d5f54428698948480e Mon Sep 17 00:00:00 2001 From: Daniel Thayer Date: Sun, 30 Aug 2015 17:21:42 -0500 Subject: [PATCH] Fix initialization of a pointer in RDP analyzer A pointer to the end of a buffer was incorrectly being initialized to a value beyond the end of the buffer. --- src/analyzer/protocol/rdp/rdp-analyzer.pac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/analyzer/protocol/rdp/rdp-analyzer.pac b/src/analyzer/protocol/rdp/rdp-analyzer.pac index a70d55fb7b..0f32c8fe40 100644 --- a/src/analyzer/protocol/rdp/rdp-analyzer.pac +++ b/src/analyzer/protocol/rdp/rdp-analyzer.pac @@ -21,7 +21,7 @@ refine flow RDP_Flow += { resultstring.resize(utf8size, '\0'); const UTF16* sourcestart = reinterpret_cast(utf16.begin()); - const UTF16* sourceend = sourcestart + widesize; + const UTF16* sourceend = reinterpret_cast(utf16.end()); UTF8* targetstart = reinterpret_cast(&resultstring[0]); UTF8* targetend = targetstart + utf8size;