am d63fb078: am e89e09dd: Fix overflow in adb_client
* commit 'd63fb078aea697c536b19c03d29d4dde4ac087fc':
Fix overflow in adb_client
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 @@
} 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 @@
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);