From 38b66f887f5edcd15149f1a0f4080e7b233c9106 Mon Sep 17 00:00:00 2001 From: Philippe Canal <pcanal@fnal.gov> Date: Mon, 15 Apr 2013 19:39:27 +0000 Subject: [PATCH] Import revision 49242 from the v5-34-00 patch branch: Avoid uninitalized memory read (SetCharge checks the value of fQ) git-svn-id: http://root.cern.ch/svn/root/trunk@49243 27541ba8-7e3a-0410-8455-c3a389f83636 --- geom/geom/src/TGeoHelix.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geom/geom/src/TGeoHelix.cxx b/geom/geom/src/TGeoHelix.cxx index 2f5f1f01257..e2b5ee1fcfe 100644 --- a/geom/geom/src/TGeoHelix.cxx +++ b/geom/geom/src/TGeoHelix.cxx @@ -72,6 +72,7 @@ TGeoHelix::TGeoHelix(Double_t curvature, Double_t hstep, Int_t charge) // Normal constructor SetXYcurvature(curvature); SetHelixStep(hstep); + fQ = 0; SetCharge(charge); fStep = 0.; fPhi = 0.; @@ -80,7 +81,6 @@ TGeoHelix::TGeoHelix(Double_t curvature, Double_t hstep, Int_t charge) fPoint[0] = fPoint[1] = fPoint[2] = 0.; fDir[0] = fDir[1] = fDir[2] = 0.; fB[0] = fB[1] = fB[2] = 0.; - fQ = 0; fMatrix = new TGeoHMatrix(); TObject::SetBit(kHelixNeedUpdate, kTRUE); TObject::SetBit(kHelixStraigth, kFALSE); -- GitLab