summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Löhning <robert.loehning@qt.io>2021-03-26 10:23:59 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-04-07 14:02:36 +0000
commitf7605d562b83aef5b098ea18bf6c89f30ec4e920 (patch)
tree5a1e0d54832c3ee97bb4330043e5f175600f8b13
parentbde2716f43e09bb575a11be17950226a19afe09e (diff)
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>
-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,