aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2013-12-10 12:39:32 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2013-12-10 12:39:32 -0800
commitb2dfa7ece7fb69d2ce5ae517eb35492beb646385 (patch)
tree6dd562bc7c68fb14e681cf64cc30262217b0b69f
parent479efb540a198a9b7cd278387b0d45009a05bb2b (diff)
parent02d90b92ce65ad4e7f49565f0e97373e1d8b0fbf (diff)
am 02d90b92: am 33e7f915: am 54a80bcf: am cd072e94: am ba104fb7: am e975716e: am 03d4eb29: am d63fb078: am e89e09dd: Fix overflow in adb_client
* commit '02d90b92ce65ad4e7f49565f0e97373e1d8b0fbf': Fix overflow in adb_client
-rw-r--r--adb/adb_client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/adb/adb_client.c b/adb/adb_client.c
index 8340738c..af87d2ac 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);