diff options
author | Tianjie Xu <xunchang@google.com> | 2016-09-01 03:06:33 +0200 |
---|---|---|
committer | Tianjie Xu <xunchang@google.com> | 2016-09-01 04:11:41 +0200 |
commit | 71e182bc3879a53f04a50de9d25c333163cb7c76 (patch) | |
tree | 4f116fad73bb81476238deb9a70313f54cd68246 /updater | |
parent | Merge "minadbd: rename adb_server_main to minadbd_main." (diff) | |
download | android_bootable_recovery-71e182bc3879a53f04a50de9d25c333163cb7c76.tar android_bootable_recovery-71e182bc3879a53f04a50de9d25c333163cb7c76.tar.gz android_bootable_recovery-71e182bc3879a53f04a50de9d25c333163cb7c76.tar.bz2 android_bootable_recovery-71e182bc3879a53f04a50de9d25c333163cb7c76.tar.lz android_bootable_recovery-71e182bc3879a53f04a50de9d25c333163cb7c76.tar.xz android_bootable_recovery-71e182bc3879a53f04a50de9d25c333163cb7c76.tar.zst android_bootable_recovery-71e182bc3879a53f04a50de9d25c333163cb7c76.zip |
Diffstat (limited to 'updater')
-rw-r--r-- | updater/blockimg.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/updater/blockimg.cpp b/updater/blockimg.cpp index f00bc4bff..0caa1acbd 100644 --- a/updater/blockimg.cpp +++ b/updater/blockimg.cpp @@ -151,6 +151,10 @@ static int read_all(int fd, uint8_t* data, size_t size) { failure_type = kFreadFailure; fprintf(stderr, "read failed: %s\n", strerror(errno)); return -1; + } else if (r == 0) { + failure_type = kFreadFailure; + fprintf(stderr, "read reached unexpected EOF.\n"); + return -1; } so_far += r; } |