Check-in [134ba0acc1]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Correct out of bounds in ByteArrayInputStream.read(byte[]).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | wip-midlevel
Files: files | file ages | folders
SHA1: 134ba0acc1e4c52c22a7935b0b02a4b43c6597e9
User & Date: stephanie.gawroriski 2020-06-30 11:56:23
Context
2020-06-30
12:20
Set SpringCoat timeout at 15 minutes. check-in: 8e7efcd19b user: stephanie.gawroriski tags: wip-midlevel
11:56
Correct out of bounds in ByteArrayInputStream.read(byte[]). check-in: 134ba0acc1 user: stephanie.gawroriski tags: wip-midlevel
02:54
Hopefully fix the last call and have all tests in cldc-compact passing? check-in: d8f6c1ca2d user: stephanie.gawroriski tags: wip-midlevel
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to modules/cldc-compact/src/main/java/java/io/ByteArrayInputStream.java.

157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
				read = count - pos;
			
			// Do not exceed this
			if (len < read)
				read = len;
			
			// Copy bytes
			System.arraycopy(buf, pos, __b, 0, len);
			pos += len;
			
			// Store new position
			this.pos = pos;
			
			if (read == 0)
				return (pos >= count ? -1 : 0);
			return read;







|
|







157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
				read = count - pos;
			
			// Do not exceed this
			if (len < read)
				read = len;
			
			// Copy bytes
			System.arraycopy(buf, pos, __b, 0, read);
			pos += read;
			
			// Store new position
			this.pos = pos;
			
			if (read == 0)
				return (pos >= count ? -1 : 0);
			return read;