mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 20:51:16 +00:00
Use static_cast<unsigned char> on DecodeBase64 to prevent SEGV on negative values (#1051)
This commit is contained in:

committed by
GitHub

parent
1713859b05
commit
2f8997565b
@@ -79,7 +79,7 @@ std::vector<unsigned char> DecodeBase64(const std::string &input) {
|
||||
// skip newlines
|
||||
continue;
|
||||
}
|
||||
unsigned char d = decoding[static_cast<unsigned>(input[i])];
|
||||
unsigned char d = decoding[static_cast<unsigned char>(input[i])];
|
||||
if (d == 255)
|
||||
return ret_type();
|
||||
|
||||
|
Reference in New Issue
Block a user