Skip to content
Snippets Groups Projects
Commit 640059c5 authored by Rene Brun's avatar Rene Brun
Browse files

Use snprintf. Fix coverity CID 13355

git-svn-id: http://root.cern.ch/svn/root/trunk@35885 27541ba8-7e3a-0410-8455-c3a389f83636
parent 006ef3aa
No related branches found
No related tags found
No related merge requests found
......@@ -127,7 +127,7 @@ TVolumePosition::TVolumePosition(const TVolumePosition* oldPosition, const TVolu
fX,newMatrix);
Int_t num = gGeometry->GetListOfMatrices()->GetSize();
Char_t anum[100];
sprintf(anum,"%d",num+1);
snprintf(anum,100,"%d",num+1);
fMatrix = new TRotMatrix(anum,"NodeView",newMatrix);
SetMatrixOwner(kTRUE);
} else {
......@@ -227,7 +227,7 @@ char *TVolumePosition::GetObjectInfo(Int_t, Int_t) const
if (!gPad) return 0;
if (!GetNode()) return 0;
static char info[64];
sprintf(info,"%s/%s, shape=%s/%s",GetNode()->GetName(),GetNode()->GetTitle(),GetNode()->GetShape()->GetName(),GetNode()->GetShape()->ClassName());
snprintf(info,64,"%s/%s, shape=%s/%s",GetNode()->GetName(),GetNode()->GetTitle(),GetNode()->GetShape()->GetName(),GetNode()->GetShape()->ClassName());
return info;
}
......@@ -566,7 +566,7 @@ TVolumePosition &TVolumePosition::Mult(const TVolumePosition &curPosition) {
,newTranslation,newMatrix);
Int_t num = gGeometry->GetListOfMatrices()->GetSize();
Char_t anum[100];
sprintf(anum,"%d",num+1);
snprintf(anum,100,"%d",num+1);
SetMatrixOwner();
Reset(curNode
,newTranslation[0],newTranslation[1],newTranslation[2]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment