summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rwxr-xr-xsrc/common/captureFile.cpp2
-rwxr-xr-xsrc/common/pcap.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/common/captureFile.cpp b/src/common/captureFile.cpp
index a4fe78be..00625181 100755
--- a/src/common/captureFile.cpp
+++ b/src/common/captureFile.cpp
@@ -110,7 +110,7 @@ void CCapPktRaw::CloneShalow(CCapPktRaw *obj){
}
void CCapPktRaw::Dump(FILE *fd,int verbose){
- fprintf(fd," =>pkt (%p) %llu , len %d, time [%x:%x] \n",raw,pkt_cnt,pkt_len,time_sec,time_nsec);
+ fprintf(fd," =>pkt (%p) %llu , len %d, time [%x:%x] \n",raw, (unsigned long long)pkt_cnt,pkt_len,time_sec,time_nsec);
if (verbose) {
utl_DumpBuffer(fd,raw,pkt_len,0);
}
diff --git a/src/common/pcap.cpp b/src/common/pcap.cpp
index 6dd54514..9b360a3e 100755
--- a/src/common/pcap.cpp
+++ b/src/common/pcap.cpp
@@ -156,7 +156,8 @@ bool LibPCapReader::ReadPacket(CCapPktRaw *lpPacket)
}
if (pkt_header.len > READER_MAX_PACKET_SIZE) {
/* cannot read this packet */
- assert(0);
+ printf("ERROR packet is too big, bigger than %d \n",READER_MAX_PACKET_SIZE);
+ exit(-1);
return false;
}