From: Joseph Sutton Date: Sun, 26 Nov 2023 23:55:51 +0000 (+1300) Subject: conditional_ace.idl: Fix undefined shift X-Git-Tag: talloc-2.4.2~472 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=59b943252486fae732e516bae095728a14891f9c;p=thirdparty%2Fsamba.git conditional_ace.idl: Fix undefined shift If ‘int’ is a 32‐bit type, then 1 << 31 cannot be represented in an ‘int’, and this shift will invoke undefined behaviour. We have got away with this so far because of a Pidl bug that changed the expression to ‘(uint32_t)1 << 31’, which is valid. But that bug is about to be fixed. Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/librpc/idl/conditional_ace.idl b/librpc/idl/conditional_ace.idl index 60b8966055a..8db0ed66b7b 100644 --- a/librpc/idl/conditional_ace.idl +++ b/librpc/idl/conditional_ace.idl @@ -428,7 +428,7 @@ interface conditional_ace * operator that argument has been resolved into an ordinary * token. So we set the flag so the operator can know. */ - const uint32 CONDITIONAL_ACE_FLAG_TOKEN_FROM_ATTR = 1 << 31; + const uint32 CONDITIONAL_ACE_FLAG_TOKEN_FROM_ATTR = UINT32_C(1) << 31; /* * The maximum size of the conditional ACE conditions in the