[Coverity] Untrusted loop bound (TAINTED_SCALAR)
This commit is contained in:
@@ -86,7 +86,7 @@ InetTopologyReader::Read (void)
|
||||
lineBuffer >> totlink;
|
||||
NS_LOG_INFO ("Inet topology should have " << totnode << " nodes and " << totlink << " links");
|
||||
|
||||
for (int i = 0; i < totnode; i++)
|
||||
for (int i = 0; i < totnode && !topgen.eof (); i++)
|
||||
{
|
||||
getline (topgen,line);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ operator>> (std::istream &is, UanPdp &pdp)
|
||||
|
||||
std::complex<double> amp;
|
||||
pdp.m_taps = std::vector<Tap> (ntaps);
|
||||
for (uint32_t i = 0; i < ntaps; i++)
|
||||
for (uint32_t i = 0; i < ntaps && !is.eof (); i++)
|
||||
{
|
||||
is >> amp >> c1;
|
||||
if (c1 != '|')
|
||||
|
||||
@@ -288,7 +288,7 @@ operator >> (std::istream &is, UanModesList &ml)
|
||||
ml.m_modes.clear ();
|
||||
ml.m_modes.resize (numModes);
|
||||
|
||||
for (int i = 0; i < numModes; i++)
|
||||
for (int i = 0; i < numModes && !is.eof (); i++)
|
||||
{
|
||||
is >> ml.m_modes[i] >> c;
|
||||
if (c != '|')
|
||||
|
||||
Reference in New Issue
Block a user