Quellcode durchsuchen

Bugfix: iobuf->data always points to the start of the allocated

portion, not to the bit we want to currently write to...
tags/v0.9.3
Michael Brown vor 18 Jahren
Ursprung
Commit
d465ae9785
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1
    1
      src/net/udp/tftp.c

+ 1
- 1
src/net/udp/tftp.c Datei anzeigen

165
 	rrq = iob_put ( iobuf, sizeof ( *rrq ) );
165
 	rrq = iob_put ( iobuf, sizeof ( *rrq ) );
166
 	rrq->opcode = htons ( TFTP_RRQ );
166
 	rrq->opcode = htons ( TFTP_RRQ );
167
 	iob_put ( iobuf,
167
 	iob_put ( iobuf,
168
-		  snprintf ( iobuf->data, iob_tailroom ( iobuf ),
168
+		  snprintf ( rrq->data, iob_tailroom ( iobuf ),
169
 			     "%s%coctet%cblksize%c%d%ctsize%c0", path, 0,
169
 			     "%s%coctet%cblksize%c%d%ctsize%c0", path, 0,
170
 			     0, 0, tftp_request_blksize, 0, 0 ) + 1 );
170
 			     0, 0, tftp_request_blksize, 0, 0 ) + 1 );
171
 
171
 

Laden…
Abbrechen
Speichern