Date: Sat, 31 Dec 2016 12:55:08 -0800 From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com> To: Michael Butler <imb@protected-networks.net> Cc: ngie@freebsd.org, freebsd-current <freebsd-current@freebsd.org> Subject: Re: SVN r310931 Bad code Message-ID: <69688AC6-02E3-4C71-8214-22F2951F8C62@gmail.com> In-Reply-To: <742de824-6f35-8c91-8603-c5a766e313b4@protected-networks.net> References: <742de824-6f35-8c91-8603-c5a766e313b4@protected-networks.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--Apple-Mail=_FC3E292F-A20B-463B-8576-CACF50C97BD8 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Dec 31, 2016, at 06:14, Michael Butler <imb@protected-networks.net> = wrote: >=20 > At line 1949 of head/contrib/bsnmp/lib/snmpclient.c, you changed .. >=20 > - if ((sc->chost =3D malloc(strlen(s) + 1)) =3D=3D NULL) { > + if ((sc->chost =3D strdup(strlen(s))) =3D=3D NULL) { >=20 > This can't work as intended since strlen returns the length of the > string not a pointer to it. >=20 > I expect this should be .. >=20 > if ((sc->chost =3D strdup(s)) =3D=3D NULL) { Yeah=E2=80=A6 egg on my face... I fixed it in r310942. Sorry for the breakage :/=E2=80=A6 -Ngie --Apple-Mail=_FC3E292F-A20B-463B-8576-CACF50C97BD8 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJYaBstAAoJEPWDqSZpMIYVbwsP/j+O0na1i9wrGmR28kkDIfYq vQDaj5/vUctFjjgOUMYd0LwlDmNkPsYD92Hq2YE2RivCxQ2liZ+b2wwSZCuVPCtp EQWtj5S+21ujGYQj/gFyG6Vx+1VbaJfmxG4eguS7KbaYIWmCD2KHI5wAhOmAwPYH VBb3fjbhcogiBVsGzJ5qAroBTvvreBtzdGS38sZXoS0uF52Hjz2iRl6zGojRyjqf R9EKRSXhB7WiG1ZMuCps0vtxnm4ZMYTShEOw9xuHmAsCeHBBx1jb4iO9C9Jkp38E L59c25vdgD8pbqMAehWZHeo4aZIwI74EJjnNR9FAfn+CYEuQT8tEi7MNq1ro52HH QGI3FvPSiGdEWssBIUgZI8wONoxt8yKM5hDqr/IUZY62d0TXxMHrp84nim2bgq47 kcBRAt1+35HiwE98Hus1VPnwwj+jbIRxd/oC2FmsMsW5OLJCoDp61gJk2rt8PpbU etZ4FABpQOQjFWiSnRXHPM6XXp2HPsAu56mAiaE9BUzBZGWloFVpOiBGcL9YUofP WruBkB/1nlbHouzRJmfwTp3dlNlLKY4f5U2bxCW27x/xyrWD0pMOir+6Bvo7yzFx TxGxugYmYFtYgk6Ip8M6K/gq68jPLRwAKy8X29MAemmAtpNunDF9H8ezn9WMrQcO UYLJEaUtIrTFiMk+mjZX =HnpP -----END PGP SIGNATURE----- --Apple-Mail=_FC3E292F-A20B-463B-8576-CACF50C97BD8--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69688AC6-02E3-4C71-8214-22F2951F8C62>