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/1833efb1b39f
branches:  trunk
changeset: 459483:1833efb1b39f
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 59e7cb3251d5 -r 1833efb1b39f 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