Exploit database

GH-50afc00e93ad474caf20584d2a24a90f

trinadh465/frameworks_base_aosp_10_r33_cve-2022-20338

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2022-20338

1 source

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.

Repository files11

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

tools/streaming_proto/string_utils.h

Text · 1,017 bytes
#include <string>
#include <vector>

namespace android {
namespace stream_proto {

using namespace std;

// Indent
const string INDENT = "    ";

/**
 * Capitalizes the string, removes underscores and makes the next letter
 * capitalized, and makes the letter following numbers capitalized.
 */
string to_camel_case(const string& str);

/**
 * Capitalize and insert underscores for CamelCase.
 */
string make_constant_name(const string& str);

/**
 * Returns the part of a file name that isn't a path and isn't a type suffix.
 */
string file_base_name(const string& str);

/**
 * Replaces all occurances of 'replace' with 'with'.
 */
string replace_string(const string& str, const char replace, const char with);

/**
 * Splits a string to parts by delimiter.
 */
vector<string> split(const string& str, const char delimiter);

/**
 * Returns the rest of str if it has prefix, otherwise return all.
 */
string stripPrefix(const string& str, const string& prefix);

} // namespace stream_proto
} // namespace android