Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f1ece5d0 authored by Chia-chi Yeh's avatar Chia-chi Yeh
Browse files

KeyStore: return null when response code indicates an error.

parent 46a41e0e
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -172,8 +172,10 @@ public class KeyStore {
            socket.shutdownOutput();

            InputStream in = socket.getInputStream();
            code = in.read();
            if (code == -1) {
            if ((code = in.read()) != NO_ERROR) {
                if (code != -1) {
                    mError = code;
                }
                return null;
            }

@@ -194,7 +196,7 @@ public class KeyStore {
                }
                results.add(result);
            }
            mError = code;
            mError = NO_ERROR;
            return results.toArray(new byte[results.size()][]);
        } catch (IOException e) {
            // ignore