From owner-freebsd-current@freebsd.org Sat Dec 31 20:55:11 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 769BAC99D22 for ; Sat, 31 Dec 2016 20:55:11 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x242.google.com (mail-pg0-x242.google.com [IPv6:2607:f8b0:400e:c05::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4427B177F; Sat, 31 Dec 2016 20:55:11 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x242.google.com with SMTP id b1so25964159pgc.1; Sat, 31 Dec 2016 12:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=eVRo2T1Guc6SR+21zUuttjOKOh91kk/qb0YpA4eQFKY=; b=rBr8swlYBt6ybS4bDbcl6ZsmuWpn/4JBREF2am1G2z2tuFCweyqAx7fPNC997lPcwy Xi/FEAI4y6jkG7LQxYCv74MU++VlS94sKhawS3Wf9CUKKz3UPUt5dswubKWwjKCEQ2nZ NCwtHHFufaTdoqpbjbM0hEMVXcsn/Sxw0/gumT1nXzu4wFMw//+9t9fIofh97zPaRRop 8WjNe6dnuCezo6d34+/JEx8kQnVLuX0IbU3yHJfQchPDhUUOW6h8VBcA58effoNtFmTZ 3GkUiCB0JGERdTC23r/VV4yW98+7EvKXFxUjfyvnRchUR76Op+ODNc+/fdbk2kUPdvik uopQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=eVRo2T1Guc6SR+21zUuttjOKOh91kk/qb0YpA4eQFKY=; b=L4rCaeh0KkdJU3ix9i9oP0IxDm/xQfnW3TtUrwrdr3H/h+lmKhHuow39HE2WcuSbkc CSYonYfnRYMB/6/eCs/a4vKzMR4rbjL1MQt3e4uNnEcocG6AF+ZYZ1rEBGhE83Jpk54W kaqr+HT+Mx2WP5bcP2Qvm9go9EIj2/GWD3cavKeFFQZYtylE7sba3n8PjBUME/xVCayu 3OQFopTlgHlB7Go+WummBJUNiwAOvqdfaUIpA8zD4KIL69xyKmQRv4MdOhjSH+q+946Z LbawtdL+O5gVB5GwwEBRVmpIVSGrnS6B0uSmgBbPSIxsWgfwmnkG0prcva5pfkVx0jOV 0rsA== X-Gm-Message-State: AIkVDXKNCHkXHb4kApVY0FQD7FAjIKk50JVuTAZM9lujaaF6CSx7p9lAiEJ/pejeb4xUXA== X-Received: by 10.84.192.131 with SMTP id c3mr112430138pld.149.1483217710486; Sat, 31 Dec 2016 12:55:10 -0800 (PST) Received: from [192.168.20.12] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id g28sm57686490pgn.13.2016.12.31.12.55.09 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 31 Dec 2016 12:55:09 -0800 (PST) Subject: Re: SVN r310931 Bad code Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_FC3E292F-A20B-463B-8576-CACF50C97BD8"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <742de824-6f35-8c91-8603-c5a766e313b4@protected-networks.net> Date: Sat, 31 Dec 2016 12:55:08 -0800 Cc: ngie@freebsd.org, freebsd-current Message-Id: <69688AC6-02E3-4C71-8214-22F2951F8C62@gmail.com> References: <742de824-6f35-8c91-8603-c5a766e313b4@protected-networks.net> To: Michael Butler X-Mailer: Apple Mail (2.3124) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2016 20:55:11 -0000 --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 = 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--