From 1b448d84067826c9b0a10998f862415d5067a116 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Fri, 25 Mar 2016 21:33:24 +0100 Subject: [PATCH] fix up dnspcap2protobuf htons plus catch exception --- pdns/dnspcap2protobuf.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pdns/dnspcap2protobuf.cc b/pdns/dnspcap2protobuf.cc index a4dfeff463..d5ace94f22 100644 --- a/pdns/dnspcap2protobuf.cc +++ b/pdns/dnspcap2protobuf.cc @@ -13,6 +13,7 @@ StatBag S; static void addRRs(const char* packet, const size_t len, PBDNSMessage_DNSResponse& response) +try { if (len < sizeof(struct dnsheader)) return; @@ -71,7 +72,10 @@ static void addRRs(const char* packet, const size_t len, PBDNSMessage_DNSRespons } } } - +catch(std::exception& e) +{ + cerr<<"Error parsing response records: "<qr) { -- 2.47.2