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

Commit a91a47c3 authored by Nick Kralevich's avatar Nick Kralevich Committed by Android Git Automerger
Browse files

am b2dfa7ec: am 02d90b92: am 33e7f915: am 54a80bcf: am cd072e94: am ba104fb7:...

am b2dfa7ec: am 02d90b92: am 33e7f915: am 54a80bcf: am cd072e94: am ba104fb7: am e975716e: am 03d4eb29: am d63fb078: am e89e09dd: Fix overflow in adb_client

* commit 'b2dfa7ec':
  Fix overflow in adb_client
parents 44eb1357 b2dfa7ec
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ int adb_connect(const char *service)
    } else {
        // if server was running, check its version to make sure it is not out of date
        char buf[100];
        int n;
        size_t n;
        int version = ADB_SERVER_VERSION - 1;

        // if we have a file descriptor, then parse version result
@@ -250,7 +250,7 @@ int adb_connect(const char *service)

            buf[4] = 0;
            n = strtoul(buf, 0, 16);
            if(n > (int)sizeof(buf)) goto error;
            if(n > sizeof(buf)) goto error;
            if(readx(fd, buf, n)) goto error;
            adb_close(fd);