aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrisso <risso>2002-08-20 15:33:31 +0000
committerrisso <risso>2002-08-20 15:33:31 +0000
commitee9e2f0c05e6c678c8be26f5625a4a97a7c9012b (patch)
treee7350e019957c98ade6e064dc175e7693f3a5b22
parent36d47557dd32cf338db2da9f86780ad45d65d957 (diff)
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.
-rw-r--r--pcap-int.h4
1 files 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];
};
/*