fix BufferedInputStream.read to not read more than specified length

This commit is contained in:
Joel Dice 2010-12-01 15:41:55 -07:00
parent 84520cde51
commit d00f4c5390

View File

@ -67,6 +67,7 @@ public class BufferedInputStream extends InputStream {
break;
} else {
count += c;
length -= c;
if (in.available() <= 0) {
break;