From f7605d562b83aef5b098ea18bf6c89f30ec4e920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20L=C3=B6hning?= Date: Fri, 26 Mar 2021 10:23:59 +0100 Subject: Explicitly set enums' type to avoid undefined behavior Fixes oss-fuzz issue 31022. Fixes: QTBUG-92159 Change-Id: I8f0dfbe0e198f9ac43754758d18db1f0842d6eae Reviewed-by: Thiago Macieira (cherry picked from commit d15bfba176f7e6c616f299e82adfde148b3f26d2) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/io/qurl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib') 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, -- cgit v1.2.3