diff options
Diffstat (limited to 'lib/libstand/dosfs.c')
-rw-r--r-- | lib/libstand/dosfs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libstand/dosfs.c b/lib/libstand/dosfs.c index 792e0be..41547c8 100644 --- a/lib/libstand/dosfs.c +++ b/lib/libstand/dosfs.c @@ -308,11 +308,14 @@ dos_seek(struct open_file *fd, off_t offset, int whence) off = size; break; default: + errno = EINVAL; return(-1); } off += offset; - if (off < 0 || off > size) + if (off < 0 || off > size) { + errno = EINVAL; return(-1); + } f->offset = (u_int)off; f->c = 0; return(off); |