Ensure cd9660_read() gives accurate EOF indication.
Should fix PR/42983.
This commit is contained in:
parent
b1400f8892
commit
a6fc850cd8
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cd9660.c,v 1.24 2008/11/19 12:36:41 ad Exp $ */
|
||||
/* $NetBSD: cd9660.c,v 1.25 2010/03/22 16:57:54 jakllsch Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1996 Wolfgang Solfrank.
|
||||
|
@ -345,6 +345,8 @@ cd9660_read(struct open_file *f, void *start, size_t size, size_t *resid)
|
|||
size -= ISO_DEFAULT_BLOCK_SIZE;
|
||||
}
|
||||
}
|
||||
if(fp->off > fp->size)
|
||||
size += fp->off - fp->size;
|
||||
if (resid)
|
||||
*resid = size;
|
||||
return rc;
|
||||
|
|
Loading…
Reference in New Issue