From 3f7cc19e21e610069c64ec9d0c1c0920299653df Mon Sep 17 00:00:00 2001 From: Edouard Tisserant Date: Sun, 11 Oct 2015 11:47:56 +0200 Subject: [PATCH] Comparison logic on enum is dangerous. --- src/gen_cpp_Engine.ysl2 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gen_cpp_Engine.ysl2 b/src/gen_cpp_Engine.ysl2 index 2c159a5..1b42614 100644 --- a/src/gen_cpp_Engine.ysl2 +++ b/src/gen_cpp_Engine.ysl2 @@ -43,6 +43,7 @@ tstylesheet { PEP_STATUS status = ::«@name»(session`apply "parm", mode=call``if "@name = 'encrypt_message'" > , PEP_enc_PEP`); if ((status > PEP_STATUS_OK && status < PEP_UNENCRYPTED) |`> |` + status < PEP_STATUS_OK |`> |` status >= PEP_TRUSTWORD_NOT_FOUND) { throw_pEp_Exception(env, status); return NULL;