- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 58 for ArrayIndexOutOfBoundsException (0.14 sec)
-
src/test/java/jcifs/internal/smb1/net/NetServerEnum2Test.java
byte[] dst = new byte[10]; // Too small for the full parameters // Should throw ArrayIndexOutOfBoundsException assertThrows(ArrayIndexOutOfBoundsException.class, () -> { netServerEnum2.writeParametersWireFormat(dst, 0); }); } @Test @DisplayName("Test writeParametersWireFormat with large buffer succeeds") void testWriteParametersWireFormatLargeBuffer() {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 19.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/ioctl/ValidateNegotiateInfoRequestTest.java
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.7K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/com/SmbComSeekResponseTest.java
void testReadParameterWordsWithShortBuffer() { byte[] buffer = new byte[] { 0x00, 0x01, 0x02 }; // only three bytes assertThrows(ArrayIndexOutOfBoundsException.class, () -> response.readParameterWordsWireFormat(buffer, 0)); } @Test @DisplayName("readParameterWordsWireFormat with null buffer - throws NullPointerException")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans2/Trans2QueryPathInformationResponseTest.java
byte[] buffer = new byte[0]; response.setDataCount(0); // The implementation will try to decode even with an empty buffer, causing ArrayIndexOutOfBoundsException assertThrows(ArrayIndexOutOfBoundsException.class, () -> { response.readDataWireFormat(buffer, 0, 0); }); } @Test @DisplayName("Test toString method") void testToString() {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/tree/Smb2TreeConnectResponseTest.java
// Given byte[] buffer = new byte[15]; // Too small for 16-byte structure SMBUtil.writeInt2(16, buffer, 0); // When & Then assertThrows(ArrayIndexOutOfBoundsException.class, () -> { response.readBytesWireFormat(buffer, 0); }); } @Test @DisplayName("Should handle offset exceeding buffer") void testOffsetExceedsBuffer() {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 19.3K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/io/Smb2FlushRequestTest.java
@DisplayName("Test buffer overflow protection") void testBufferOverflowProtection() { byte[] smallBuffer = new byte[23]; // One byte too small // Should throw ArrayIndexOutOfBoundsException assertThrows(ArrayIndexOutOfBoundsException.class, () -> { request.writeBytesWireFormat(smallBuffer, 0); }); } @Test @DisplayName("Test file ID boundary values")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/-UtilCommon.kt
* See the License for the specific language governing permissions and * limitations under the License. */ @file:Suppress("ktlint:standard:filename") package okhttp3.internal import okio.ArrayIndexOutOfBoundsException import okio.Buffer import okio.BufferedSink import okio.BufferedSource import okio.ByteString.Companion.decodeHex import okio.Closeable import okio.FileNotFoundException import okio.FileSystem
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon May 05 16:01:00 UTC 2025 - 10.1K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/io/Smb2WriteRequestTest.java
byte[] data = new byte[100]; request.setData(data, 200, 50); // Offset beyond array byte[] buffer = new byte[256]; assertThrows(ArrayIndexOutOfBoundsException.class, () -> request.writeBytesWireFormat(buffer, 0)); } @Test @DisplayName("Should handle negative offset") void testNegativeOffset() {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 22.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/lock/Smb2LockRequestTest.java
request.setFileId(shortFileId); byte[] buffer = new byte[256]; // Should handle gracefully or throw appropriate exception assertThrows(ArrayIndexOutOfBoundsException.class, () -> request.writeBytesWireFormat(buffer, 0)); } @Test @DisplayName("Should handle buffer overflow protection") void testBufferOverflowProtection() {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 25.3K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/lock/Smb2LockResponseTest.java
// Given byte[] buffer = new byte[1]; // Too small to read 2-byte structure size // When & Then assertThrows(ArrayIndexOutOfBoundsException.class, () -> response.readBytesWireFormat(buffer, 0)); } @Test @DisplayName("Should throw exception when buffer index out of bounds")
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.1K bytes - Viewed (0)