Explicit check for negative positions in PHYSFS_seek().
This commit is contained in:
parent
1bed4abbaa
commit
2ea6feeb2b
1
physfs.c
1
physfs.c
|
@ -1281,6 +1281,7 @@ int PHYSFS_seek(PHYSFS_file *handle, int pos)
|
||||||
assert(h != NULL);
|
assert(h != NULL);
|
||||||
assert(h->funcs != NULL);
|
assert(h->funcs != NULL);
|
||||||
BAIL_IF_MACRO(h->funcs->seek == NULL, ERR_NOT_SUPPORTED, 0);
|
BAIL_IF_MACRO(h->funcs->seek == NULL, ERR_NOT_SUPPORTED, 0);
|
||||||
|
BAIL_IF_MACRO(pos < 0, ERR_INVALID_ARGUMENT, 0);
|
||||||
return(h->funcs->seek(h, pos));
|
return(h->funcs->seek(h, pos));
|
||||||
} /* PHYSFS_seek */
|
} /* PHYSFS_seek */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue