Skip to content
Snippets Groups Projects
Commit 963e6a8c authored by Eduardo Rodrigues's avatar Eduardo Rodrigues
Browse files

Merge branch 'fix-write-beyond-bound' into 'master'

fix write beyond array bound

See merge request !345
parents c3c0ac95 b6c22a78
No related branches found
No related tags found
5 merge requests!663Tuple tool centrality,!639DECLARE_COMPONENT in TupleToolMCPVAssociation backport,!448Added a check for tracks with nDoF>256 into TupleToolTrackInfo,!383fixed typo in Fit2D,!345fix write beyond array bound
......@@ -198,7 +198,8 @@ warning()<< m_MergedPizerosLocation << " Not available"<<endmsg;
verbose() << "Filling variables with conesize " << coneSize << endmsg;
// -- Convert the conesize to a string
char coneNumber[4];
// -- Convert the conesize to a string (and don't forget space for the terminating '\0'!)
char coneNumber[5];
sprintf( coneNumber, "%.2f", coneSize );
std::string conesize( coneNumber );
......
......@@ -133,8 +133,8 @@ StatusCode TupleToolTrackIsolation::fill( const LHCb::Particle *top,
double deltaPhi = fabs(part->momentum().Phi() - momentumInCone.Phi());
if(deltaPhi > M_PI) deltaPhi = 2*M_PI-deltaPhi;
// -- Convert the conesize to a string
char coneNumber[4];
// -- Convert the conesize to a string (and don't forget the space for the terminating '\0'!)
char coneNumber[5];
sprintf(coneNumber, "%.2f", coneSizeCounter);
std::string conesize(coneNumber);
......
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