From 395d2af80de7817dd2b092c2c7d9dfa3fa3f2744 Mon Sep 17 00:00:00 2001 From: Linus Jahn Date: Wed, 16 Mar 2022 19:29:04 +0100 Subject: StartTlsPacket: Fix UB when parsing invalid type --- src/base/QXmppStartTlsPacket.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/base/QXmppStartTlsPacket.h') diff --git a/src/base/QXmppStartTlsPacket.h b/src/base/QXmppStartTlsPacket.h index 9b91bef9..5396f5d9 100644 --- a/src/base/QXmppStartTlsPacket.h +++ b/src/base/QXmppStartTlsPacket.h @@ -39,7 +39,8 @@ public: enum Type { StartTls, ///< Used by the client to initiate STARTTLS. Proceed, ///< Used by the server to accept STARTTLS. - Failure ///< Used by the server to reject STARTTLS. + Failure, ///< Used by the server to reject STARTTLS. + Invalid, ///< Invalid type }; QXmppStartTlsPacket(Type type = StartTls); -- cgit v1.2.3