Issue 127449 - Possible access to unintended variable in "main/svx/source/svdraw/svdxcgv.cxx" line 500
Summary: Possible access to unintended variable in "main/svx/source/svdraw/svdxcgv.cxx...
Status: UNCONFIRMED
Alias: None
Product: General
Classification: Code
Component: code (show other issues)
Version: 4.2.0-dev
Hardware: All All
: P5 (lowest) Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-22 13:10 UTC by Petru-Florin Mihancea
Modified: 2017-06-22 13:11 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
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