summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-08-30 09:56:27 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-08-30 09:56:27 +0200
commit11cc9bdc21be241f2feb3ab4822d9d365dba4f96 (patch)
tree105a7f5b342e7510984c6db77067e8016de8a274
parentd0f8361289dc6ed88f0ae8074bea34b57d811341 (diff)
Avoid UBSan "left shift of 65536 by 16 places cannot be represented...
...in type 'int'" warning when constructing an XML_TOKEN_MAP_END instance, whose nPrefixKey is 0xffffU. Problem got introduced with 41b3fd8ca54eff7e71c69bb0b60e63016f1ac8c2 "Make SvXMLTokenMap compatible with FastTokens", the intent was presumably to make the shifted value of ( nPrefixKey + 1 ) << 16 be zero in that case. Change-Id: I0b83a03198a44e54077899e4484634286d06cdcc
-rw-r--r--include/xmloff/xmltkmap.hxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/xmloff/xmltkmap.hxx b/include/xmloff/xmltkmap.hxx
index 2953dac755d7..89cfd6584d1a 100644
--- a/include/xmloff/xmltkmap.hxx
+++ b/include/xmloff/xmltkmap.hxx
@@ -44,7 +44,7 @@ struct SvXMLTokenMapEntry
nPrefixKey( nPrefix ),
eLocalName( eName ),
nToken( nTok ),
- nFastToken( ( nPrefixKey + 1 ) << 16 | eLocalName )
+ nFastToken( sal_uInt32( nPrefixKey + 1 ) << 16 | eLocalName )
{
if ( nFastTok ) // alternative value for duplicate/dummy tokens
nFastToken = nFastTok;