Use snprintf instead of sprintf to quieten codeql
parent
82a28b78d8
commit
a62f4b2e77
|
@ -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++;
|
||||
|
|
Loading…
Reference in New Issue