libpcap/fix-use-of-sizeof-on-a-pointer.patch
2019-09-30 10:57:32 -04:00

27 lines
836 B
Diff

From 8107ee96602992924adccc01bb2214d24d389182 Mon Sep 17 00:00:00 2001
From: Alexander Galanin <al@galanin.nnov.ru>
Date: Mon, 3 Dec 2018 16:12:48 +0300
Subject: [PATCH 259/470] fix use of sizeof on a pointer
---
pcap-bpf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pcap-bpf.c b/pcap-bpf.c
index 3b53978..13c1cf2 100644
--- a/pcap-bpf.c
+++ b/pcap-bpf.c
@@ -1366,8 +1366,8 @@ bpf_load(char *errbuf)
/* Check if the driver is loaded */
memset(&cfg_ld, 0x0, sizeof(cfg_ld));
+ pcap_snprintf(buf, sizeof(buf), "%s/%s", DRIVER_PATH, BPF_NAME);
cfg_ld.path = buf;
- pcap_snprintf(cfg_ld.path, sizeof(cfg_ld.path), "%s/%s", DRIVER_PATH, BPF_NAME);
if ((sysconfig(SYS_QUERYLOAD, (void *)&cfg_ld, sizeof(cfg_ld)) == -1) ||
(cfg_ld.kmid == 0)) {
/* Driver isn't loaded, load it now */
--
1.8.3.1