diff options
author | Nick Kralevich <nnk@google.com> | 2013-12-10 12:31:17 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-12-10 12:31:17 -0800 |
commit | 33e7f915d6a27880dd4c4c0709dcc921f549eea2 (patch) | |
tree | 5c6d00969a29767908458478547cac472ff68bd0 /adb | |
parent | b0739c662db6a19b49c0912b865edb2853156bda (diff) | |
parent | 54a80bcf88060b21f527c631c7ec911171bdb13f (diff) | |
download | system_core-33e7f915d6a27880dd4c4c0709dcc921f549eea2.zip system_core-33e7f915d6a27880dd4c4c0709dcc921f549eea2.tar.gz system_core-33e7f915d6a27880dd4c4c0709dcc921f549eea2.tar.bz2 |
am 54a80bcf: am cd072e94: am ba104fb7: am e975716e: am 03d4eb29: am d63fb078: am e89e09dd: Fix overflow in adb_client
* commit '54a80bcf88060b21f527c631c7ec911171bdb13f':
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 8340738..af87d2a 100644 --- a/adb/adb_client.c +++ b/adb/adb_client.c @@ -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); |