mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 02:18:04 +01:00
#4320: Integer overflow in Poco::UTF32Encoding
This commit is contained in:
@@ -69,6 +69,15 @@ public:
|
||||
int queryConvert(const unsigned char* bytes, int length) const;
|
||||
int sequenceLength(const unsigned char* bytes, int length) const;
|
||||
|
||||
protected:
|
||||
static int safeToInt(Poco::UInt32 value)
|
||||
{
|
||||
if (value <= 0x10FFFF)
|
||||
return static_cast<int>(value);
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
private:
|
||||
bool _flipBytes;
|
||||
static const char* _names[];
|
||||
|
||||
Reference in New Issue
Block a user