From ee9e2f0c05e6c678c8be26f5625a4a97a7c9012b Mon Sep 17 00:00:00 2001 From: risso Date: Tue, 20 Aug 2002 15:33:31 +0000 Subject: Since the maximum error message size of libpcap is PCAP_ERRBUF_SIZE, this prevents having problems when using printf() to print the buffer, since the buffer will always be zero-terminated. --- pcap-int.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcap-int.h b/pcap-int.h index 214491e..e66a94b 100644 --- a/pcap-int.h +++ b/pcap-int.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#) $Header: /tcpdump/master/libpcap/pcap-int.h,v 1.39 2002-08-02 03:25:32 guy Exp $ (LBL) + * @(#) $Header: /tcpdump/master/libpcap/pcap-int.h,v 1.40 2002-08-20 15:33:31 risso Exp $ (LBL) */ #ifndef pcap_int_h @@ -114,7 +114,7 @@ struct pcap { */ struct bpf_program fcode; - char errbuf[PCAP_ERRBUF_SIZE]; + char errbuf[PCAP_ERRBUF_SIZE + 1]; }; /* -- cgit v1.2.3