Source-Changes-D archive

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

Re: CVS commit: src/external/bsd/dhcpcd/dist/src



On Thu, Feb 13, 2020 at 4:44 PM Santhosh Raju <fox%netbsd.org@localhost> wrote:
>
> On Thu, Feb 13, 2020 at 4:32 PM Kamil Rytarowski <n54%gmx.com@localhost> wrote:
> >
> > On 13.02.2020 22:20, Valery Ushakov wrote:
> > > I did not propose to disable the warning.  I proposed to downgrade
> > > -Werror to -Wno-error (i.e. a warning) and only for the buggy
> > > sanitizer build.  That file will still be compiled in normal builds
> > > with all the warnings=errors enabled, so real problems won't be
> > > overlooked.
> >
> > OK, we can try this path.
> >
> > Santosh, could you please revert and try -Wno-error + upstream it?
> >
> > Thank you in advance!
> >
>
> Sure, let me prepare the patch.
>

The patch has been prepared.

The builds were run both with and without MKLIBCSANITIZER=yes and it
was completed successfully.

Let us know if it alright to commit this.

> --
> Santhosh

--
Santhosh
Index: dist/src/dhcp.c
===================================================================
RCS file: /cvsroot/src/external/bsd/dhcpcd/dist/src/dhcp.c,v
retrieving revision 1.33
diff -u -p -u -r1.33 dhcp.c
--- dist/src/dhcp.c	8 Feb 2020 12:17:16 -0000	1.33
+++ dist/src/dhcp.c	14 Feb 2020 20:32:20 -0000
@@ -3307,7 +3307,7 @@ is_packet_udp_bootp(void *packet, size_t
 	memcpy(&udp, (char *)ip + ip_hlen, sizeof(udp));
 	if (ntohs(udp.uh_ulen) < sizeof(udp))
 		return false;
-	if (ip_hlen + (size_t)ntohs(udp.uh_ulen) > plen)
+	if (ip_hlen + ntohs(udp.uh_ulen) > plen)
 		return false;
 
 	/* Check it's to and from the right ports. */
Index: sbin/dhcpcd/Makefile
===================================================================
RCS file: /cvsroot/src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile,v
retrieving revision 1.50
diff -u -p -u -r1.50 Makefile
--- sbin/dhcpcd/Makefile	29 Jan 2020 23:42:57 -0000	1.50
+++ sbin/dhcpcd/Makefile	14 Feb 2020 20:32:20 -0000
@@ -27,6 +27,11 @@ SRCS+=		auth.c
 .if (${USE_INET} != "no")
 CPPFLAGS+=	-DINET
 SRCS+=		bpf.c dhcp.c ipv4.c
+.if (${MKLIBCSANITIZER:Uno} == "yes")
+.if (${ACTIVE_CC} == "gcc" && ${HAVE_GCC:U0} == 8)
+COPTS.dhcp.c+=	-Wno-error=sign-conversion
+.endif
+.endif
 .if !defined(SMALLPROG)
 CPPFLAGS+=	-DARP
 SRCS+=		arp.c


Home | Main Index | Thread Index | Old Index