Explicitly set enums' type to avoid undefined behavior

Fixes oss-fuzz issue 31022.

Fixes: QTBUG-92159
Change-Id: I8f0dfbe0e198f9ac43754758d18db1f0842d6eae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit d15bfba176f7e6c616f299e82adfde148b3f26d2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Robert Löhning 2021-03-26 10:23:59 +01:00 committed by Qt Cherry-pick Bot
parent bde2716f43
commit f7605d562b

View File

@ -130,7 +130,7 @@ public:
}; };
// encoding / toString values // encoding / toString values
enum UrlFormattingOption { enum UrlFormattingOption : unsigned int {
None = 0x0, None = 0x0,
RemoveScheme = 0x1, RemoveScheme = 0x1,
RemovePassword = 0x2, RemovePassword = 0x2,
@ -147,7 +147,7 @@ public:
NormalizePathSegments = 0x1000 NormalizePathSegments = 0x1000
}; };
enum ComponentFormattingOption { enum ComponentFormattingOption : unsigned int {
PrettyDecoded = 0x000000, PrettyDecoded = 0x000000,
EncodeSpaces = 0x100000, EncodeSpaces = 0x100000,
EncodeUnicode = 0x200000, EncodeUnicode = 0x200000,