forked from osmocom/wireshark
Return *some* error if we end up trying to seek before the beginning of
the file, so you don't get weird random errors. EINVAL is as good as anything. svn path=/trunk/; revision=39896
This commit is contained in:
parent
eacdf1d46f
commit
f3a88d4084
|
@ -982,7 +982,7 @@ file_seek(FILE_T file, gint64 offset, int whence, int *err)
|
|||
if (offset < 0) {
|
||||
offset += file->pos;
|
||||
if (offset < 0) { /* before start of file! */
|
||||
/* *err = ???; */
|
||||
*err = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
/* rewind, then skip to offset */
|
||||
|
|
Loading…
Reference in New Issue