| 1930 | |
| 1931 | |
| 1932 | static std::string CheckForUTF16String(const DataBuffer& memory) |
| 1933 | { |
| 1934 | std::string result; |
| 1935 | size_t i = 0; |
| 1936 | while (true) |
| 1937 | { |
| 1938 | if (i > memory.GetLength() - 2) |
| 1939 | break; |
| 1940 | if (IsPrintableChar(memory[i]) && (memory[i + 1] == 0)) |
| 1941 | { |
| 1942 | result += memory[i]; |
| 1943 | i += 2; |
| 1944 | } |
| 1945 | else |
| 1946 | { |
| 1947 | break; |
| 1948 | } |
| 1949 | } |
| 1950 | |
| 1951 | if (result.length() >= 4) |
| 1952 | return result; |
| 1953 | else |
| 1954 | return ""; |
| 1955 | } |
| 1956 | |
| 1957 | |
| 1958 | static std::string CheckForUTF32String(const DataBuffer& memory) |
no test coverage detected