diff options
| author | Nick Kralevich <nnk@google.com> | 2013-12-10 12:14:44 -0800 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2013-12-10 12:14:44 -0800 |
| commit | d63fb078aea697c536b19c03d29d4dde4ac087fc (patch) | |
| tree | 69b3becd6b78d6ff1976cf76de6174704b2c42e0 /adb | |
| parent | 0933c6f4d8536eb1c950bb8900ba925dc6b0b00e (diff) | |
| parent | e89e09dd2b9b42184973e3ade291186a2737bced (diff) | |
| download | system_core-d63fb078aea697c536b19c03d29d4dde4ac087fc.tar.gz system_core-d63fb078aea697c536b19c03d29d4dde4ac087fc.tar.bz2 system_core-d63fb078aea697c536b19c03d29d4dde4ac087fc.zip | |
am e89e09dd: Fix overflow in adb_client
* commit 'e89e09dd2b9b42184973e3ade291186a2737bced':
Fix overflow in adb_client
Diffstat (limited to 'adb')
| -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 9a812f0cf..89eb42813 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); |
