Assert that the file size is above zero
This commit is contained in:
parent
88a1a87ca6
commit
c11bdd7f47
1 changed files with 2 additions and 0 deletions
|
|
@ -207,6 +207,8 @@ int main(int argc, char *argv[]) {
|
||||||
wjob.bufsize = BLOCKSIZE;
|
wjob.bufsize = BLOCKSIZE;
|
||||||
wjob.block_size = BLOCKSIZE;
|
wjob.block_size = BLOCKSIZE;
|
||||||
|
|
||||||
|
assert(file_stat.st_size >= 0);
|
||||||
|
|
||||||
perform_write(&wjob);
|
perform_write(&wjob);
|
||||||
|
|
||||||
if (wjob.buffer)
|
if (wjob.buffer)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue