commit - f392e333e6fe8e8ce5e2ebc285041cbe95236c5e
commit + b6752625761f06493a89a02076323aa1a0d73819
blob - d504c3cf373260971af39d4b5d4a4b4dbbc12f27
blob + ddf52c6ae8143c17897c8f7a8d6a265bbd26fc7c
--- lib/object.c
+++ lib/object.c
FILE *outfile, struct got_blob_object *blob)
{
const struct got_error *err = NULL;
- size_t len, hdrlen;
+ size_t n, len, hdrlen;
const uint8_t *buf;
int i;
}
}
/* Skip blob object header first time around. */
- fwrite(buf + hdrlen, len - hdrlen, 1, outfile);
+ n = fwrite(buf + hdrlen, len - hdrlen, 1, outfile);
+ if (n != len - hdrlen)
+ return got_ferror(outfile, GOT_ERR_IO);
hdrlen = 0;
} while (len != 0);