SVN r310931 Bad code
Ngie Cooper (yaneurabeya)
yaneurabeya at gmail.com
Sat Dec 31 20:55:11 UTC 2016
> On Dec 31, 2016, at 06:14, Michael Butler <imb at protected-networks.net> wrote:
>
> At line 1949 of head/contrib/bsnmp/lib/snmpclient.c, you changed ..
>
> - if ((sc->chost = malloc(strlen(s) + 1)) == NULL) {
> + if ((sc->chost = strdup(strlen(s))) == NULL) {
>
> This can't work as intended since strlen returns the length of the
> string not a pointer to it.
>
> I expect this should be ..
>
> if ((sc->chost = strdup(s)) == NULL) {
Yeah… egg on my face... I fixed it in r310942.
Sorry for the breakage :/…
-Ngie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20161231/7588760f/attachment.sig>
More information about the freebsd-current
mailing list