rem: var d = this.filestream.readBytes(this.parent.sendChunk); 
add: var d; if (this.parent.sendChunk > this.size) d = this.filestream.readBytes(this.size); else d = this.filestream.readBytes(this.parent.sendChunk); 
context: function dfile_onSocketAccepted(socket, transport){    this.state.getAccept();    this.connection.accept(transport, null);    this.state.socketConnected();    this.position = 0;    this.ackPosition = 0;    this.remoteIP = transport.host;    this.eventPump.addEvent(new CEvent("dcc-file", "connect",                                       this, "onConnect"));    try {        this.filestream = Components.classes["@mozilla.org/binaryinputstream;1"];        this.filestream = this.filestream.createInstance(nsIBinaryInputStream);        this.filestream.setInputStream(this.localFile.baseInputStream);        // Start the reading!        var d = this.filestream.readBytes(this.parent.sendChunk);        this.position += d.length;        this.connection.sendData(d);    }    catch(ex)    {        dd(ex);    }    // Start the reading!    if (jsenv.HAS_NSPR_EVENTQ)        this.connection.startAsyncRead(this);    else        this.eventPump.addEvent(new CEvent("dcc-file", "poll", this, "onPoll"));}
meta: 1622	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1622/f3370241dbdb00c9aafa435d47586a11ad91fd2e/dcc.js/clean/js/lib/dcc.js