Use snprintf instead of sprintf to quieten codeql

pull/3669/merge
Isaac Connor 2023-02-23 16:52:19 -05:00
parent 82a28b78d8
commit a62f4b2e77
1 changed files with 1 additions and 1 deletions

View File

@ -393,7 +393,7 @@ std::string UriEncode(const std::string &value) {
} else if (isalnum(c) || c == '-' || c == '_' || c == '.' || c == '~') {
retbuf.push_back(c);
} else {
sprintf(tmp, "%%%02X", c);
snprintf(tmp, 4, "%%%02X", c);
retbuf.append(tmp);
}
src++;