summaryrefslogtreecommitdiffstats
path: root/adb/adb_client.c
diff options
context:
space:
mode:
Diffstat (limited to 'adb/adb_client.c')
-rw-r--r--adb/adb_client.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/adb/adb_client.c b/adb/adb_client.c
index 586cd7b..1e47486 100644
--- a/adb/adb_client.c
+++ b/adb/adb_client.c
@@ -324,7 +324,10 @@ char *adb_query(const char *service)
buf[4] = 0;
n = strtoul(buf, 0, 16);
- if(n > 1024) goto oops;
+ if(n >= 0xffff) {
+ strcpy(__adb_error, "reply is too long (>= 64kB)");
+ goto oops;
+ }
tmp = malloc(n + 1);
if(tmp == 0) goto oops;