summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qurl.h
diff options
context:
space:
mode:
authorRobert Löhning <robert.loehning@qt.io>2021-03-26 10:23:59 +0100
committerRobert Löhning <robert.loehning@qt.io>2021-04-07 08:53:01 +0100
commitd15bfba176f7e6c616f299e82adfde148b3f26d2 (patch)
tree29c832adc21f9bc483704c2012bda39b486931e5 /src/corelib/io/qurl.h
parentd05118bf10e9a8ab419248a31d45a694a4622cb0 (diff)
Explicitly set enums' type to avoid undefined behavior
Fixes oss-fuzz issue 31022. Fixes: QTBUG-92159 Pick-to: 6.1 Change-Id: I8f0dfbe0e198f9ac43754758d18db1f0842d6eae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qurl.h')
-rw-r--r--src/corelib/io/qurl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h
index a78fbfcd3f..f777a1a629 100644
--- a/src/corelib/io/qurl.h
+++ b/src/corelib/io/qurl.h
@@ -130,7 +130,7 @@ public:
};
// encoding / toString values
- enum UrlFormattingOption {
+ enum UrlFormattingOption : unsigned int {
None = 0x0,
RemoveScheme = 0x1,
RemovePassword = 0x2,
@@ -147,7 +147,7 @@ public:
NormalizePathSegments = 0x1000
};
- enum ComponentFormattingOption {
+ enum ComponentFormattingOption : unsigned int {
PrettyDecoded = 0x000000,
EncodeSpaces = 0x100000,
EncodeUnicode = 0x200000,