Issue 127449

Summary: Possible access to unintended variable in "main/svx/source/svdraw/svdxcgv.cxx" line 500
Product: General Reporter: Petru-Florin Mihancea <petrum>
Component: codeAssignee: AOO issues mailing list <issues>
Status: UNCONFIRMED --- QA Contact:
Severity: Normal    
Priority: P5 (lowest) CC: petrum
Version: 4.2.0-dev   
Target Milestone: ---   
Hardware: All   
OS: All   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description Petru-Florin Mihancea 2017-06-22 13:10:28 UTC
While experimenting with a CodeSonar plugin we develop, we noticed a
potential issue in file "main/svx/source/svdraw/svdxcgv.cxx" line 500 function ImpPasteObject

nSizX*=aMapFact.X().GetNumerator();
nSizX*=rMap.GetScaleX().GetNumerator();
nSizX*=aDstFr.GetDenominator();
nSizX/=aMapFact.X().GetDenominator();
nSizX/=rMap.GetScaleX().GetDenominator();
nSizX/=aDstFr.GetNumerator();
nSizY*=aMapFact.Y().GetNumerator();
nSizY*=rMap.GetScaleY().GetNumerator();
nSizX*=aDstFr.GetDenominator();               //Line 500
nSizY/=aMapFact.Y().GetDenominator();
nSizY/=rMap.GetScaleY().GetDenominator();
nSizY/=aDstFr.GetNumerator();

Shouldn't you update nSizY instead of nSizX? (in other words, I think the last character of the identifier should be Y and not X).

Regards,
Petru-Florin Mihancea