Apache OpenOffice (AOO) Bugzilla – Issue 100481
svx: ambiguous && and ||
Last modified: 2010-01-23 12:48:07 UTC
X && Y || Z binds operator precedence-wise as (X && Y) || Z not X && (Y || Z) so I am a little suspicious about... source/dialog/numpages.cxx where we have repeated patterns of... if(bPreset || bModified && pActNum) *pSaveNum = *pActNum; i.e. its clearly unsafe to dereference pActNum if it is NULL if bPreset if true and bModified is false, but that is what would happen at the moment. Are we sure that's what we want, if not the attached patch fixes them up. Also note the first instance tests off pSaveNum which is different to the normal pattern of testing pActNum, but otherwise the code is the same, which is also suspicious
Created attachment 61120 [details] suspicious code
started, adding issue to CWS ka100
fixed
verified
closing