Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/dhcpcd/dist/src Sync



details:   https://anonhg.NetBSD.org/src/rev/f003eb97777d
branches:  trunk
changeset: 965340:f003eb97777d
user:      roy <roy%NetBSD.org@localhost>
date:      Fri Sep 13 11:54:03 2019 +0000

description:
Sync

diffstat:

 external/bsd/dhcpcd/dist/src/dhcp.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (17 lines):

diff -r 2aa1a206db1b -r f003eb97777d external/bsd/dhcpcd/dist/src/dhcp.c
--- a/external/bsd/dhcpcd/dist/src/dhcp.c       Fri Sep 13 11:52:31 2019 +0000
+++ b/external/bsd/dhcpcd/dist/src/dhcp.c       Fri Sep 13 11:54:03 2019 +0000
@@ -3264,7 +3264,13 @@
        if (from != NULL)
                from->s_addr = ip->ip_src.s_addr;
 
+       /* Check we have the IP header */
        ip_hlen = (size_t)ip->ip_hl * 4;
+       if (ip_hlen > plen) {
+               errno = ENOBUFS;
+               return -1;
+       }
+
        if (in_cksum(ip, ip_hlen, NULL) != 0) {
                errno = EINVAL;
                return -1;



Home | Main Index | Thread Index | Old Index