[patch] abuse of strncpy
Mike Frysinger
vapier at gentoo.org
Wed Jun 7 07:26:49 PDT 2006
On Thursday 01 June 2006 19:00, Erik Hovland wrote:
> --- networking/tftp.c (revision 15261)
> +++ networking/tftp.c (working copy)
> @@ -172,7 +172,10 @@
> len = sizeof(sa);
>
> memset(&sa, 0, len);
> - bind(socketfd, (struct sockaddr *)&sa, len);
> + if (bind(socketfd, (struct sockaddr *)&sa, len) < 0) {
> + bb_perror_msg("bind");
> + return EXIT_FAILURE;
> + }
>
> sa.sin_family = host->h_addrtype;
> sa.sin_port = port;
what does this have to do with strncpy() ?
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 827 bytes
Desc: not available
Url : http://busybox.net/lists/busybox/attachments/20060607/a4405212/attachment.pgp
More information about the busybox
mailing list