author | Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
Mon, 19 Apr 2010 20:47:57 +0200 | |
changeset 6250 | 5b6c35b27f62 |
parent 6249 | bb33e80b06b0 |
child 6251 | ff3501de65dc |
--- a/src/common/pcap-file.cc Mon Apr 19 20:45:43 2010 +0200 +++ b/src/common/pcap-file.cc Mon Apr 19 20:47:57 2010 +0200 @@ -227,6 +227,11 @@ m_file.read ((char *)&m_fileHeader.m_snapLen, sizeof(m_fileHeader.m_snapLen)); m_file.read ((char *)&m_fileHeader.m_type, sizeof(m_fileHeader.m_type)); + if (m_file.fail ()) + { + return; + } + // // There are four possible magic numbers that can be there. Normal and byte // swapped versions of the standard magic number, and normal and byte swapped