This is the body of the "bufferInMemory" method (class
org.dbforms.util.FileHolder)

        byte[] tmpMemoryBuffer = new byte[maxSize];
        // this could lead to memory problems. if it does used filebuffering
instead
        fileLength = partInput.read( tmpMemoryBuffer );
        memoryBuffer = new byte[fileLength];
         System.arraycopy( tmpMemoryBuffer, 0, memoryBuffer, 0,
fileLength );
        tmpMemoryBuffer = null;
I think that if I try to upload  a file with wrong path the first read
return -1 (fileLength = -1),so the next instruction throws an Exception
because of a negative array size.
Is it true?



-------------------------------------------------------
This sf.net email is sponsored by: 
Battle your brains against the best in the Thawte Crypto 
Challenge. Be the first to crack the code - register now: 
http://www.gothawte.com/rd521.html
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to