X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fheader.c;h=e223ce9fa291f1e3756fa0eae2c400cadf1c6996;hp=57cea04f1ae96442be014cfa8f9559924be01ecc;hb=32614c9f026be20f0336df3053b91090dc53297f;hpb=4075b6ec704b03f387af8044762f228b60ffb2d6 diff --git a/src/header.c b/src/header.c index 57cea04f..e223ce9f 100644 --- a/src/header.c +++ b/src/header.c @@ -96,7 +96,9 @@ read_wim_header(WIMStruct *wim, struct wim_header *hdr) /* Pipable WIM: Use header at end instead, unless * actually reading from a pipe. */ if (!in_fd->is_pipe) { - lseek(in_fd->fd, -WIM_HEADER_DISK_SIZE, SEEK_END); + ret = WIMLIB_ERR_READ; + if (-1 == lseek(in_fd->fd, -WIM_HEADER_DISK_SIZE, SEEK_END)) + goto read_error; ret = full_read(in_fd, &disk_hdr, sizeof(disk_hdr)); if (ret) goto read_error;