Index: java/java/io/FileInputStream.java =================================================================== --- java/java/io/FileInputStream.java (revision 428654) +++ java/java/io/FileInputStream.java (working copy) @@ -307,7 +307,12 @@ if (count == 0) { return 0; } - + + if (count < 0){ + throw new IOException(org.apache.harmony.luni.util.Msg + .getString("KA010")); //$NON-NLS-1$ + } + // stdin requires special handling if (fd == FileDescriptor.in) { // Read and discard count bytes in 8k chunks Index: java/org/apache/harmony/luni/util/ExternalMessages.properties =================================================================== --- java/org/apache/harmony/luni/util/ExternalMessages.properties (revision 428654) +++ java/org/apache/harmony/luni/util/ExternalMessages.properties (working copy) @@ -301,3 +301,4 @@ KA00d=ReadableByteChannel is null KA00e=Radix {0} is less than Character.MIN_RADIX or greater than Character.MAX_RADIX KA00f=Socket output is shutdown +KA010=number of bytes to skip is negative