Commit 1dd100ff authored by Mike Hibler's avatar Mike Hibler
Browse files

Add an essential off_t cast to avoid an overflow.

This was blowing up the '-N' ("just save it") option of frisbee on big
parent 2c0d82a5
......@@ -1082,7 +1082,7 @@ write_subblock(int chunkno, const char *chunkbufp)
writebuf_t *wbuf;
off_t offset, size, bytesleft;
offset = chunkno * CHUNKSIZE;
offset = (off_t)chunkno * CHUNKSIZE;
bytesleft = CHUNKSIZE;
while (bytesleft > 0) {
size = (bytesleft >= OUTSIZE) ? OUTSIZE : bytesleft;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment