From: Eric Biggers Date: Sun, 30 Sep 2012 21:55:49 +0000 (-0500) Subject: extract_wim_resource_to_fd(): Handle full_write() retval correctly X-Git-Tag: v1.0.4~51 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=d3a6c0b6414f880a9cea4d8655570d9f556f319d extract_wim_resource_to_fd(): Handle full_write() retval correctly --- diff --git a/src/resource.c b/src/resource.c index 11e8c7dc..f7a7916e 100644 --- a/src/resource.c +++ b/src/resource.c @@ -1013,7 +1013,7 @@ int extract_wim_resource_to_fd(const struct lookup_table_entry *lte, int fd, if (ret != 0) break; sha1_update(&ctx, buf, to_read); - if (full_write(fd, buf, to_read) < 0) { + if (full_write(fd, buf, to_read) < to_read) { ERROR_WITH_ERRNO("Error extracting WIM resource"); return WIMLIB_ERR_WRITE; }