From c5612b74eba2ae40383f7ac7ddd9b1b80166e461 Mon Sep 17 00:00:00 2001 From: Courville Software Date: Fri, 13 Sep 2024 18:25:52 +0200 Subject: [PATCH] UdpDiscovery: should catch StringIndexOutOfBoundsException as well --- src/jcifs/netbios/UdpDiscovery.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jcifs/netbios/UdpDiscovery.java b/src/jcifs/netbios/UdpDiscovery.java index 57970ec..337b5ca 100644 --- a/src/jcifs/netbios/UdpDiscovery.java +++ b/src/jcifs/netbios/UdpDiscovery.java @@ -200,7 +200,7 @@ public void run() { } try { response.readWireFormat(rcv_buf.array(), 0); - } catch (ArrayIndexOutOfBoundsException e) { + } catch (StringIndexOutOfBoundsException | ArrayIndexOutOfBoundsException e) { log.error("UdpDiscoveryThread", e); if (log.isTraceEnabled()) log.error("UdpDiscoveryThread", e); else log.warn("doTcpDiscovery: caught ArrayIndexOutOfBoundsException");