diff --git a/src/main/java/fr/pandacube/util/network_api/client/ResponseAnalyser.java b/src/main/java/fr/pandacube/util/network_api/client/ResponseAnalyser.java index 29c5a74..cb50435 100644 --- a/src/main/java/fr/pandacube/util/network_api/client/ResponseAnalyser.java +++ b/src/main/java/fr/pandacube/util/network_api/client/ResponseAnalyser.java @@ -26,10 +26,14 @@ public class ResponseAnalyser { // lecture de la première ligne line = in.readLine(); + if (line == null) + throw new IOException("Not enough data to read first line of response."); good = line.equalsIgnoreCase("OK"); // lecture de la deuxième ligne line = in.readLine(); + if (line == null) + throw new IOException("Not enough data to read second line of response."); int data_size = 0; try {