summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2017-06-03 16:55:46 +0200
committerDees Troy <dees_troy@teamw.in>2017-06-04 04:30:09 +0200
commit4a2a1914a2bbe97ed55aa7b0e000aa4c6c8cb1ca (patch)
treeb05d21e7ce1b1f603e5069b8d30ffac336542cc7
parentFix various memory errors (diff)
downloadandroid_bootable_recovery-4a2a1914a2bbe97ed55aa7b0e000aa4c6c8cb1ca.tar
android_bootable_recovery-4a2a1914a2bbe97ed55aa7b0e000aa4c6c8cb1ca.tar.gz
android_bootable_recovery-4a2a1914a2bbe97ed55aa7b0e000aa4c6c8cb1ca.tar.bz2
android_bootable_recovery-4a2a1914a2bbe97ed55aa7b0e000aa4c6c8cb1ca.tar.lz
android_bootable_recovery-4a2a1914a2bbe97ed55aa7b0e000aa4c6c8cb1ca.tar.xz
android_bootable_recovery-4a2a1914a2bbe97ed55aa7b0e000aa4c6c8cb1ca.tar.zst
android_bootable_recovery-4a2a1914a2bbe97ed55aa7b0e000aa4c6c8cb1ca.zip
-rw-r--r--adbbu/twrpback.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/adbbu/twrpback.cpp b/adbbu/twrpback.cpp
index d9b973bcc..1c98a1b5c 100644
--- a/adbbu/twrpback.cpp
+++ b/adbbu/twrpback.cpp
@@ -330,7 +330,7 @@ int twrpback::backup(std::string command) {
//to the adb stream.
//If the stream is compressed, we need to always write the data.
if (writedata || compressed) {
- while ((bytes = read(adb_read_fd, &result, sizeof(result))) == MAX_ADB_READ) {
+ while ((bytes = read(adb_read_fd, &result, sizeof(result))) > 0) {
if (firstDataPacket) {
struct AdbBackupControlType data_block;