diff options
author | Renato Botelho <garga@FreeBSD.org> | 2021-01-06 22:49:34 +0800 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2021-01-06 22:49:34 +0800 |
commit | bfadc030568e1e43fa67ff110da61e175116ab8f (patch) | |
tree | 46cb679d8674d43681420456c3f5ccd266e871ee /net/libpcap/files | |
parent | 2f61097a83b8249b229338995b23b7f5237aa5ea (diff) | |
download | freebsd-ports-gnome-bfadc030568e1e43fa67ff110da61e175116ab8f.tar.gz freebsd-ports-gnome-bfadc030568e1e43fa67ff110da61e175116ab8f.tar.zst freebsd-ports-gnome-bfadc030568e1e43fa67ff110da61e175116ab8f.zip |
net/libpcap: Update to 1.10.0
Sponsored by: Rubicon Communications, LLC (Netgate)
Diffstat (limited to 'net/libpcap/files')
-rw-r--r-- | net/libpcap/files/patch-gencode.c | 33 | ||||
-rw-r--r-- | net/libpcap/files/patch-nametoaddr.c | 21 |
2 files changed, 0 insertions, 54 deletions
diff --git a/net/libpcap/files/patch-gencode.c b/net/libpcap/files/patch-gencode.c deleted file mode 100644 index 8d439e20edb9..000000000000 --- a/net/libpcap/files/patch-gencode.c +++ /dev/null @@ -1,33 +0,0 @@ -diff --git a/gencode.c b/gencode.c -index bdc35e64..040a5531 100644 ---- gencode.c -+++ gencode.c -@@ -6947,11 +6947,15 @@ gen_mcode(compiler_state_t *cstate, const char *s1, const char *s2, - return (NULL); - - nlen = __pcap_atoin(s1, &n); -+ if (nlen < 0) -+ bpf_error(cstate, "invalid IPv4 address '%s'", s1); - /* Promote short ipaddr */ - n <<= 32 - nlen; - - if (s2 != NULL) { - mlen = __pcap_atoin(s2, &m); -+ if (mlen < 0) -+ bpf_error(cstate, "invalid IPv4 address '%s'", s2); - /* Promote short ipaddr */ - m <<= 32 - mlen; - if ((n & ~m) != 0) -@@ -7009,8 +7013,11 @@ gen_ncode(compiler_state_t *cstate, const char *s, bpf_u_int32 v, struct qual q) - vlen = __pcap_atodn(s, &v); - if (vlen == 0) - bpf_error(cstate, "malformed decnet address '%s'", s); -- } else -+ } else { - vlen = __pcap_atoin(s, &v); -+ if (vlen < 0) -+ bpf_error(cstate, "invalid IPv4 address '%s'", s); -+ } - - switch (q.addr) { - diff --git a/net/libpcap/files/patch-nametoaddr.c b/net/libpcap/files/patch-nametoaddr.c deleted file mode 100644 index a501d89a31d7..000000000000 --- a/net/libpcap/files/patch-nametoaddr.c +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/nametoaddr.c b/nametoaddr.c -index 53070a28..13bf4c68 100644 ---- nametoaddr.c -+++ nametoaddr.c -@@ -674,8 +674,15 @@ __pcap_atoin(const char *s, bpf_u_int32 *addr) - len = 0; - for (;;) { - n = 0; -- while (*s && *s != '.') -+ while (*s && *s != '.') { -+ if (n > 25) { -+ /* The result will be > 255 */ -+ return -1; -+ } - n = n * 10 + *s++ - '0'; -+ } -+ if (n > 255) -+ return -1; - *addr <<= 8; - *addr |= n & 0xff; - len += 8; |