diff options
author | Nick Kralevich <nnk@google.com> | 2013-12-10 12:25:59 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-12-10 12:25:59 -0800 |
commit | cd072e94cf7e546cd6d333cd65641edcd69402b7 (patch) | |
tree | 8283a0a260d77c4dd14c6cc57e0aff4664c793aa | |
parent | f9094401491ecee8e574b294a22e850bfc2b5043 (diff) | |
parent | ba104fb7f1f0acad99a0d3a1cf7153aab57ea450 (diff) | |
download | system_core-cd072e94cf7e546cd6d333cd65641edcd69402b7.zip system_core-cd072e94cf7e546cd6d333cd65641edcd69402b7.tar.gz system_core-cd072e94cf7e546cd6d333cd65641edcd69402b7.tar.bz2 |
am ba104fb7: am e975716e: am 03d4eb29: am d63fb078: am e89e09dd: Fix overflow in adb_client
* commit 'ba104fb7f1f0acad99a0d3a1cf7153aab57ea450':
Fix overflow in adb_client
-rw-r--r-- | adb/adb_client.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/adb/adb_client.c b/adb/adb_client.c index 9a812f0..89eb428 100644 --- a/adb/adb_client.c +++ b/adb/adb_client.c @@ -228,7 +228,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 @@ -237,7 +237,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); |