From: Michael Brown Date: Thu, 28 Jun 2007 17:38:50 +0000 (+0100) Subject: Bugfix: iobuf->data always points to the start of the allocated X-Git-Tag: v0.9.3~365 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d465ae978556a84fd43380ceca8c55a86b2733fd;p=thirdparty%2Fipxe.git Bugfix: iobuf->data always points to the start of the allocated portion, not to the bit we want to currently write to... --- diff --git a/src/net/udp/tftp.c b/src/net/udp/tftp.c index 4613f59e2..a75600419 100644 --- a/src/net/udp/tftp.c +++ b/src/net/udp/tftp.c @@ -165,7 +165,7 @@ static int tftp_send_rrq ( struct tftp_request *tftp ) { rrq = iob_put ( iobuf, sizeof ( *rrq ) ); rrq->opcode = htons ( TFTP_RRQ ); iob_put ( iobuf, - snprintf ( iobuf->data, iob_tailroom ( iobuf ), + snprintf ( rrq->data, iob_tailroom ( iobuf ), "%s%coctet%cblksize%c%d%ctsize%c0", path, 0, 0, 0, tftp_request_blksize, 0, 0 ) + 1 );