coverity#705539 Unintentional integer overflow

Change-Id: I3d170feeabcdd5f1ac3e64e1018edfb30b2b3c4c
This commit is contained in:
Caolán McNamara
2014-02-13 14:10:20 +00:00
parent 1c71cef7f8
commit 70bf486672
2 changed files with 6 additions and 6 deletions

View File

@@ -1243,11 +1243,11 @@ private:
OUString sBaseURL;
// Ini-Flags:
sal_uLong nIniFlags; // Flags aus der writer.ini
sal_uLong nIniFlags1; // dito ( zusaetzliche Flags )
sal_uLong nFieldFlags; // dito fuer Feldern
sal_uLong nFieldTagAlways[3]; // dito fuers Taggen von Feldern
sal_uLong nFieldTagBad[3]; // dito fuers Taggen von nicht importierbaren F.
sal_uInt32 nIniFlags; // Flags aus der writer.ini
sal_uInt32 nIniFlags1; // dito ( zusaetzliche Flags )
sal_uInt32 nFieldFlags; // dito fuer Feldern
sal_uInt32 nFieldTagAlways[3]; // dito fuers Taggen von Feldern
sal_uInt32 nFieldTagBad[3]; // dito fuers Taggen von nicht importierbaren F.
bool m_bRegardHindiDigits; // import digits in CTL scripts as Hindi numbers
WW8_CP nDrawCpO; // Anfang der Txbx-SubDocs

View File

@@ -836,7 +836,7 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
sal_uInt16 n = (aF.nId <= eMax) ? aF.nId : static_cast<sal_uInt16>(eMax);
sal_uInt16 nI = n / 32; // # des sal_uInt32
sal_uLong nMask = 1 << ( n % 32 ); // Maske fuer Bits
sal_uInt32 nMask = 1 << ( n % 32 ); // Maske fuer Bits
if ((sizeof(nFieldTagAlways)/sizeof(nFieldTagAlways[0])) <= nI)
{ // if indexes larger than 95 are needed, then a new configuration