Small improvement

pull/214/head
M66B 12 months ago
parent 1222d87f8b
commit f5e3ebaa9a

@ -447,9 +447,12 @@ public class DnsHelper {
InputStream is = socket.getInputStream(); InputStream is = socket.getInputStream();
int hi = is.read(); int hi = is.read();
if (hi < 0)
throw new IOException("EOF");
int lo = is.read(); int lo = is.read();
if (hi < 0 || lo < 0) if (lo < 0)
throw new IOException("EOF"); throw new IOException("EOF");
int len = hi * 256 + lo; int len = hi * 256 + lo;
byte[] in = new byte[len]; byte[] in = new byte[len];
int i = 0; int i = 0;

Loading…
Cancel
Save