| 1956 | |
| 1957 | |
| 1958 | static std::string CheckForUTF32String(const DataBuffer& memory) |
| 1959 | { |
| 1960 | std::string result; |
| 1961 | size_t i = 0; |
| 1962 | while (true) |
| 1963 | { |
| 1964 | if (i > memory.GetLength() - 4) |
| 1965 | break; |
| 1966 | if (IsPrintableChar(memory[i]) && (memory[i + 1] == 0) && (memory[i + 2] == 0) && (memory[i + 3] == 0)) |
| 1967 | { |
| 1968 | result += memory[i]; |
| 1969 | i += 4; |
| 1970 | } |
| 1971 | else |
| 1972 | { |
| 1973 | break; |
| 1974 | } |
| 1975 | } |
| 1976 | |
| 1977 | if (result.length() >= 4) |
| 1978 | return result; |
| 1979 | else |
| 1980 | return ""; |
| 1981 | } |
| 1982 | |
| 1983 | |
| 1984 | static std::string CheckForPrintableString(const DataBuffer& memory) |
no test coverage detected